summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-11-28 23:23:27 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-11-28 23:23:27 -0500
commit31cecebd4831fbf58310509c1486244a532d96b9 (patch)
tree00028588d33a02b2847dbaadfc20ea0c1f9653d6 /test/dialect/postgresql/test_compiler.py
parent4aaf3753d75c68050c136e734c29aae5ff9504b4 (diff)
downloadsqlalchemy-31cecebd4831fbf58310509c1486244a532d96b9.tar.gz
- add support for specifying tables or entities for "of"
- implement Query with_for_update() - rework docs and tests
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r--test/dialect/postgresql/test_compiler.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index 05963e51c..409d6f03a 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -283,6 +283,13 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
self.assert_compile(
table1.select(table1.c.myid == 7).
+ with_for_update(read=True, nowait=True, of=table1),
+ "SELECT mytable.myid, mytable.name, mytable.description "
+ "FROM mytable WHERE mytable.myid = %(myid_1)s "
+ "FOR SHARE OF mytable NOWAIT")
+
+ self.assert_compile(
+ table1.select(table1.c.myid == 7).
with_for_update(read=True, nowait=True, of=table1.c.myid),
"SELECT mytable.myid, mytable.name, mytable.description "
"FROM mytable WHERE mytable.myid = %(myid_1)s "