[sqlalchemy] Enforcing order of operations when using SQL Expression Language

2013-07-31 Thread Matt Murphy
I am defining a Comparator as follows: class VersionComparator(CompositeProperty.Comparator): def __eq__(self, other): return and_(*[a == b for a, b in zip(self.__clause_element__().clauses, other.__composite_values__())]) def __lt__(self, other): lhs =

Re: [sqlalchemy] Enforcing order of operations when using SQL Expression Language

2013-07-31 Thread Michael Bayer
On Jul 31, 2013, at 10:53 PM, Matt Murphy matthew.john.mur...@gmail.com wrote: When I look at the SQL that is created it looks like this: FROM components WHERE NOT (components.major %(major_1)s OR components.major = %(major_2)s AND components.minor %(minor_1)s OR components.major =