diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-02-23 20:46:27 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-02-23 20:46:27 +0000 |
| commit | 736bc3bd5194a9a9f9dbb2424e4c0b6139bc8a77 (patch) | |
| tree | a14c55fc0cafecaa8134b56fafdcff010aa7be01 /test/sql | |
| parent | f0b72859f96de082021a8928c2600da241369151 (diff) | |
| download | sqlalchemy-736bc3bd5194a9a9f9dbb2424e4c0b6139bc8a77.tar.gz | |
- exists() becomes useable as a standalone selectable, not just in a
WHERE clause
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/select.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/sql/select.py b/test/sql/select.py index bdc79c400..7473d4f63 100644 --- a/test/sql/select.py +++ b/test/sql/select.py @@ -124,6 +124,9 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") A def testdontovercorrelate(self): self.runtest(select([table1], from_obj=[table1, table1.select()]), """SELECT mytable.myid, mytable.name, mytable.description FROM mytable, (SELECT mytable.myid AS myid, mytable.name AS name, mytable.description AS description FROM mytable)""") + + def testselectexists(self): + self.runtest(exists([table1.c.myid], table1.c.myid==5).select(), "SELECT EXISTS (SELECT mytable.myid AS myid FROM mytable WHERE mytable.myid = :mytable_myid)", params={'mytable_myid':5}) def testwheresubquery(self): # TODO: this tests that you dont get a "SELECT column" without a FROM but its not working yet. |
