On 26/09/2015 21:15, Mike Bayer wrote:


On 9/25/15 12:24 PM, Chris Withers wrote:
On 25/09/2015 13:58, Mike Bayer wrote:
session.query(A).filter(A.id>10).as_at(now))

you'd need to subclass Query and dig into Query.column_descriptions to get at the existing entities, then add all that criterion.
remind me where the docs are for plugging in a subclassed Query into a session?
it's just straight up subclassing. there's some examples such as at https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/PreFilteredQuery.

...which points to this:

https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/GlobalFilter

...which I like the feel of but can't quite get my head around how to make the TemporalOption apply to every table that uses a Temporal mixin that is involved in the query.

Chris

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to