On Dec 11, 2011, at 1:06 PM, Michael Bayer wrote:

> 
> In the above case, you'd just say "comments_replies = []".   

correction, as you're attempting to return a Query; you'd factor the calling 
code to expect that an empty list of user_ids as input should result in an 
empty result that can't be further generated.

An EmptyQuery type of object on the SQLA side would be very challenging to 
implement and test and I'm not sure would present a generalized solution to the 
"X IN ()" problem  - cases like:

query(Parent).outerjoin(Child, Parent.children).filter(Child.id.in_([]))

The Query clearly can still return results.  There's lots of ways it might be 
very hard to decide how an EmptyQuery should be evaluated.

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to