summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-09-21 17:15:33 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-09-21 17:15:33 +0000
commit887fdc87efa77273cf1cae7647bb04fa398aa1ad (patch)
tree6013bf061d660e96b4e23ade49447d49452e13de /test/sql
parent399865aad0a47a21b96070492c84b3efa6ba9a77 (diff)
downloadsqlalchemy-887fdc87efa77273cf1cae7647bb04fa398aa1ad.tar.gz
- BooleanExpression includes new "negate" argument to specify
the appropriate negation operator if one is available. - calling a negation on an "IN" or "IS" clause will result in "NOT IN", "IS NOT" (as opposed to NOT (x IN y)).
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/select.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/sql/select.py b/test/sql/select.py
index 586184b4a..ac5af4f3b 100644
--- a/test/sql/select.py
+++ b/test/sql/select.py
@@ -559,6 +559,9 @@ FROM mytable, myothertable WHERE mytable.myid = myothertable.otherid AND mytable
self.runtest(select([table1], table1.c.myid.in_(select([table2.c.otherid]))),
"SELECT mytable.myid, mytable.name, mytable.description FROM mytable WHERE mytable.myid IN (SELECT myothertable.otherid AS otherid FROM myothertable)")
+
+ self.runtest(select([table1], ~table1.c.myid.in_(select([table2.c.otherid]))),
+ "SELECT mytable.myid, mytable.name, mytable.description FROM mytable WHERE mytable.myid NOT IN (SELECT myothertable.otherid AS otherid FROM myothertable)")
def testlateargs(self):
"""tests that a SELECT clause will have extra "WHERE" clauses added to it at compile time if extra arguments