I am trying to write a convenience wrapper something like:
def wrapper(self, arg_a=None, arg_a=None):
query = self.session.query(Table_A).\
filter(Table_A.col_a == arg_a, Table_A.col_b == arg_b).\
all()
...
The actual query is much longer, none the less to handle the case where
the optional input is left out, the query needs different logic. Without
eval
and string formatting, how does one safely accomplish this?
Thanks,
jlc
--
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/groups/opt_out.