On 4/10/15 10:23 PM, Horcle wrote:
I really dig use of the column operator for constructing queries, but have been unsuccessful with using this when the argument is "between." I read somewhere that Column.op(var) when var = "in_" does not work, so I would assume that this is true with "between."


between is a three-op, that is, it is "x BETWEEN a AND b". op() isn't built with that in mind but you can always chain, such as:

>>> print column('x').op('BETWEEN')(and_(column('a'), column('b')))
x BETWEEN a AND b


depends on what you want to do really (why not just use between() ?)



Am I doing something wrong, or is this an expected behavior? If so, is there a more general way to deal with evaluating all passed column operators so that I don't have to have separate conditions for the between and in operators?

Thanks in advance!

Greg--

--
Greg M. Silverman
Senior Developer Analyst
Cardiovascular Informatics <http://www.med.umn.edu/cardiology/>
University of Minnesota


--
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] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
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/d/optout.

Reply via email to