summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-06-21 17:42:42 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-06-21 17:42:42 +0000
commit3c1a7710f0c1278a18ddeec28f3f67362fbc5ae7 (patch)
treeb00780a1b492b1d0c65cb18dbaf33ab72bb0fc08 /test/sql
parenta1fe6e2c7607740c46eaab89e2bcd70aaccee71e (diff)
downloadsqlalchemy-3c1a7710f0c1278a18ddeec28f3f67362fbc5ae7.tar.gz
- added standalone distinct() function in addition to column.distinct()
[ticket:558]
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/select.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/sql/select.py b/test/sql/select.py
index 2f627ee8f..d8b872098 100644
--- a/test/sql/select.py
+++ b/test/sql/select.py
@@ -244,6 +244,15 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") A
checkparams = {'myothertable_othername': 'asdf', 'myothertable_othername_1':'foo', 'myothertable_otherid': 9, 'mytable_myid': 12}
)
+ def testdistinct(self):
+ self.runtest(
+ select([table1.c.myid.distinct()]), "SELECT DISTINCT mytable.myid FROM mytable"
+ )
+
+ self.runtest(
+ select([distinct(table1.c.myid)]), "SELECT DISTINCT mytable.myid FROM mytable"
+ )
+
def testoperators(self):
self.runtest(
table1.select((table1.c.myid != 12) & ~(table1.c.name=='john')),