On Sep 28, 2012, at 1:54 PM, Jonathan Vanasco wrote: > I would really like to make a feature request for a `not_in_` operator for > sqlalchemy.sql.operators.ColumnOperators > > there are at least 2 ways to make a valid query right now : > > filter( ~ table.column.in_( (1,2,) ) ) > filter( sqlalchemy.not( table.column.in_( (1,2,) ) ) > > so there isn't any problem in missing or broken functionality > > this is just a fairly common comparison (in my experience) , and when looking > through code or trying to regex queries out of source code during debugging / > testing sessions it becomes a bit of a pain to find these. > > it would just be a lot easier to maintain code if i could search for > instances of column.not_in_ , than having to find the instances of column.in_ > and then filtering down to one of 2(+?) options someone might have used. (or > vice versa) > > this probably holds true for other comparisons too, this one was just really > irritating me this week.
there are some "not" operators but currently they arent attached to ColumnOperators. You can get them from sqlalchemy.sql.operators and they are: notin_op(), notlike_op(), notilike_op() so like: notin_op(left, right) as far as sticking them on ColumnOperators I'm a little concerned about more than one way to do it, but I suppose the analogue is in python: "not x is y" vs. "x is not y". So sure. but id rather keep on 0.8 for this as a lot of other aspects of operators are changing. -- 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.