Re: [sqlalchemy] in-place modification of queries?

2015-12-30 Thread Chris Withers
Mike, Would you be interested in a pull request to add a Query and/or Session option for this? My use case right now is putting the query in a registry so other callables down the line can refine the search criteria, but I may well not being alone in

[sqlalchemy] in-place modification of queries?

2015-12-28 Thread Chris Withers
Hi All, Is there anything I can do to make Query instance non-generative? query = session.query(Foo) query.filter(Foo.x==1) ...and have the query actually be modified rather than returning a new query with the clause added? cheers, Chris -- You received this message because you are

Re: [sqlalchemy] in-place modification of queries?

2015-12-28 Thread Mike Bayer
not through the current API, no. you'd need to write some modifier to the @generative decorator and basically tinker with things to make it do that. On 12/28/2015 06:18 AM, Chris Withers wrote: > Hi All, > > Is there anything I can do to make Query instance non-generative? > > query =