On Tuesday 07 October 2008 12:20:49 robert rottermann wrote:
> hi there,
> I would like to add entries to an and_ clause dinamycally like:
>
> and_clause = and_()
> if x:
> add sommething to and_clause
> if y:
> add sommething to and_clause
> ..
1.
clist = []
if x:
add sommething to clist
if y:
add sommething to clist
clause = and_( *clist)
2. use clause &= whatever but that will need checking for empty
initial clause everytime
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---