diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-03 19:42:38 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-03 19:42:38 -0400 |
| commit | 2b10aa45a101acfcc6090a3801af998ef8fc1a2d (patch) | |
| tree | 60329bc3771b31910eb3d1e51412525ed4222066 /lib/sqlalchemy/testing | |
| parent | 4399431b53e5d132672431205c654d7d6b32dd77 (diff) | |
| download | sqlalchemy-2b10aa45a101acfcc6090a3801af998ef8fc1a2d.tar.gz | |
- ensure literal_binds works with LIMIT clause, FOR UPDATE
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_select.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_select.py b/lib/sqlalchemy/testing/suite/test_select.py index 3f14ada05..68dadd0a9 100644 --- a/lib/sqlalchemy/testing/suite/test_select.py +++ b/lib/sqlalchemy/testing/suite/test_select.py @@ -136,6 +136,21 @@ class LimitOffsetTest(fixtures.TablesTest): [(2, 2, 3), (3, 3, 4)] ) + def test_limit_offset_nobinds(self): + """test that 'literal binds' mode works - no bound params.""" + + table = self.tables.some_table + stmt = select([table]).order_by(table.c.id).limit(2).offset(1) + sql = stmt.compile( + dialect=config.db.dialect, + compile_kwargs={"literal_binds": True}) + sql = str(sql) + + self._assert_result( + sql, + [(2, 2, 3), (3, 3, 4)] + ) + @testing.requires.bound_limit_offset def test_bound_limit(self): table = self.tables.some_table |
