Hi,

I am currently doing the following query:

s = select()
query = db.query(model.Invoice).options(contains_eager('client'))
rs = query.instances(s.execute())

I was wondering if it was possible to instead of query.instances(), just 
attached the select to the query object, then continue to manipulate the 
query object further, before executing the query later.

eg.

s = select()
query = db.query(model.Invoice).options(contains_eager('client'))
query = query.from_select(s)   #
query = query.limit(10).offset(10)
rs = query.list()

What I'm doing, is pretty much setting up a query in one place of my 
program, then passing this query around, manipulating certain aspects of 
that query, then finally executing the query in some other place in my 
program.

Thanks

Huy




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to