diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-31 20:00:42 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-10-31 20:00:42 -0400 |
| commit | 7bf5ac9c1e814c999d4930941935e1d5cfd236bf (patch) | |
| tree | 38d17ab75456492f7a6984723a001d8935501318 /test/sql/test_compiler.py | |
| parent | d2c1edfb15334a2fb6ada5b064563c144ac22ad7 (diff) | |
| download | sqlalchemy-7bf5ac9c1e814c999d4930941935e1d5cfd236bf.tar.gz | |
- ensure kwargs are passed for limit clause on a compound select as well,
further fixes for #3034
Diffstat (limited to 'test/sql/test_compiler.py')
| -rw-r--r-- | test/sql/test_compiler.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 3e6b87351..bfafed599 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -238,6 +238,22 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): checkparams=params ) + def test_limit_offset_select_literal_binds(self): + stmt = select([1]).limit(5).offset(6) + self.assert_compile( + stmt, + "SELECT 1 LIMIT 5 OFFSET 6", + literal_binds=True + ) + + def test_limit_offset_compound_select_literal_binds(self): + stmt = select([1]).union(select([2])).limit(5).offset(6) + self.assert_compile( + stmt, + "SELECT 1 UNION SELECT 2 LIMIT 5 OFFSET 6", + literal_binds=True + ) + def test_select_precol_compile_ordering(self): s1 = select([column('x')]).select_from(text('a')).limit(5).as_scalar() s2 = select([s1]).limit(10) |
