diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-29 16:35:02 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-08-29 16:35:02 -0400 |
| commit | e4bc7d289477e22815f4c6ab86b3f0c1bf356e08 (patch) | |
| tree | fdfe33b2ab7e5ef54b62877d4c17a56a401e23ed /lib/sqlalchemy/dialects/firebird | |
| parent | 87fd1e3260d957ae25c44cc2ac30ce97feb89b35 (diff) | |
| download | sqlalchemy-e4bc7d289477e22815f4c6ab86b3f0c1bf356e08.tar.gz | |
- move LIMIT/OFFSET rendering to be as bind parameters, for all backends
which support it. This includes SQLite, MySQL, Postgresql, Firebird,
Oracle (already used binds with ROW NUMBER OVER), MSSQL (when ROW NUMBER
is used, not TOP). Not included are Informix, Sybase, MaxDB, Access
[ticket:805]
- LIMIT/OFFSET parameters need to stay as literals within SQL
constructs. This because they may not be renderable as binds on
some backends.
Diffstat (limited to 'lib/sqlalchemy/dialects/firebird')
| -rw-r--r-- | lib/sqlalchemy/dialects/firebird/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py index da8bef8c0..04439afb9 100644 --- a/lib/sqlalchemy/dialects/firebird/base.py +++ b/lib/sqlalchemy/dialects/firebird/base.py @@ -263,9 +263,9 @@ class FBCompiler(sql.compiler.SQLCompiler): result = "" if select._limit: - result += "FIRST %d " % select._limit + result += "FIRST %s " % self.process(sql.literal(select._limit)) if select._offset: - result +="SKIP %d " % select._offset + result +="SKIP %s " % self.process(sql.literal(select._offset)) if select._distinct: result += "DISTINCT " return result |
