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.
oh and then you use the query_cls argument:
http://docs.sqlalchemy.org/en/rel_1_0/orm/session_api.html#sqlalchemy.orm.session.Session.__init__
I'm hoping you've already just read the source for 30 seconds by now and
found all this out....
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 [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.