summaryrefslogtreecommitdiff
path: root/test/sql/select.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-10-04 03:19:38 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-10-04 03:19:38 +0000
commitf67fcd182277e6347ad0b97e265ccb24a4e5bd49 (patch)
tree9f25ed7aa0a47b1075f03ba47fdd756815e7d7b8 /test/sql/select.py
parentc25fa30febb2fc7ac21fe1379ee03595c7c6a8b6 (diff)
downloadsqlalchemy-f67fcd182277e6347ad0b97e265ccb24a4e5bd49.tar.gz
- move PG RETURNING tests to postgres dialect test
- added server_version_info() support for PG dialect - exclude PG versions < 8.4 for RETURNING tests
Diffstat (limited to 'test/sql/select.py')
-rw-r--r--test/sql/select.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/sql/select.py b/test/sql/select.py
index 4cdac97d8..8096b0c97 100644
--- a/test/sql/select.py
+++ b/test/sql/select.py
@@ -1185,34 +1185,6 @@ class CRUDTest(SQLCompileTest):
u = table1.update(table1.c.name==s)
self.assert_compile(u, "UPDATE mytable SET myid=:myid, name=:name, description=:description WHERE mytable.name = (SELECT myothertable.othername FROM myothertable WHERE myothertable.otherid = mytable.myid)")
- @testing.supported('postgres')
- def testupdatereturning(self):
- dialect = postgres.dialect()
-
- u = update(table1, values=dict(name='foo'), postgres_returning=[table1.c.myid, table1.c.name])
- self.assert_compile(u, "UPDATE mytable SET name=%(name)s RETURNING mytable.myid, mytable.name", dialect=dialect)
-
- u = update(table1, values=dict(name='foo'), postgres_returning=[table1])
- self.assert_compile(u, "UPDATE mytable SET name=%(name)s "\
- "RETURNING mytable.myid, mytable.name, mytable.description", dialect=dialect)
-
- u = update(table1, values=dict(name='foo'), postgres_returning=[func.length(table1.c.name)])
- self.assert_compile(u, "UPDATE mytable SET name=%(name)s RETURNING length(mytable.name)", dialect=dialect)
-
- @testing.supported('postgres')
- def testinsertreturning(self):
- dialect = postgres.dialect()
-
- i = insert(table1, values=dict(name='foo'), postgres_returning=[table1.c.myid, table1.c.name])
- self.assert_compile(i, "INSERT INTO mytable (name) VALUES (%(name)s) RETURNING mytable.myid, mytable.name", dialect=dialect)
-
- i = insert(table1, values=dict(name='foo'), postgres_returning=[table1])
- self.assert_compile(i, "INSERT INTO mytable (name) VALUES (%(name)s) "\
- "RETURNING mytable.myid, mytable.name, mytable.description", dialect=dialect)
-
- i = insert(table1, values=dict(name='foo'), postgres_returning=[func.length(table1.c.name)])
- self.assert_compile(i, "INSERT INTO mytable (name) VALUES (%(name)s) RETURNING length(mytable.name)", dialect=dialect)
-
def testdelete(self):
self.assert_compile(delete(table1, table1.c.myid == 7), "DELETE FROM mytable WHERE mytable.myid = :mytable_myid")