diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2020-11-27 18:04:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-11-27 18:04:13 +0000 |
commit | 92ed93fedcac67675293cab3aac688b15cc2048a (patch) | |
tree | e8687c5a47249c2f455e8f33609e60a3d44495be /test/dialect/postgresql/test_compiler.py | |
parent | 2ecf94776fe47842eed54c0536813393bfc546c5 (diff) | |
parent | 6125dfff91ca0093a00d78804917240617825c44 (diff) | |
download | sqlalchemy-92ed93fedcac67675293cab3aac688b15cc2048a.tar.gz |
Merge "Don't discard leftovers from surface_selectables"
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r-- | test/dialect/postgresql/test_compiler.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index 9651f7bd9..6dc782e8e 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -1222,6 +1222,26 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): "FOR UPDATE OF mytable_1, table2", ) + # ensure of=text() for of works + self.assert_compile( + table1.select(table1.c.myid == 7).with_for_update( + of=text("table1") + ), + "SELECT mytable.myid, mytable.name, mytable.description " + "FROM mytable WHERE mytable.myid = %(myid_1)s " + "FOR UPDATE OF table1", + ) + + # ensure literal_column of works + self.assert_compile( + table1.select(table1.c.myid == 7).with_for_update( + of=literal_column("table1") + ), + "SELECT mytable.myid, mytable.name, mytable.description " + "FROM mytable WHERE mytable.myid = %(myid_1)s " + "FOR UPDATE OF table1", + ) + def test_for_update_with_schema(self): m = MetaData() table1 = Table( |