diff options
author | Dobes Vandermeer <dvandermeer@roovy.com> | 2014-04-25 10:42:12 -0700 |
---|---|---|
committer | Dobes Vandermeer <dvandermeer@roovy.com> | 2014-04-25 10:42:12 -0700 |
commit | 4af172b644d90f1bcab3de2bd0501a9cf50dc1d5 (patch) | |
tree | 7aba558ad48bee120a64a8350e6a515cdca7b3d2 /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | e9b398f8a6ecd5b68142ab334a81683eff966e09 (diff) | |
download | sqlalchemy-4af172b644d90f1bcab3de2bd0501a9cf50dc1d5.tar.gz |
Use _offset_clause and _limit_clause, which are always Visitable and usually a BindParameter, instead of _offset and _limit in GenerativeSelect.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index d63e3ed87..4e5f9d703 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1144,12 +1144,12 @@ class PGCompiler(compiler.SQLCompiler): def limit_clause(self, select): text = "" - if select._limit is not None: - text += " \n LIMIT " + self.process(_literal_as_binds(select._limit)) - if select._offset is not None: - if select._limit is None: + if select._limit_clause is not None: + text += " \n LIMIT " + self.process(select._limit_clause) + if select._offset_clause is not None: + if select._limit_clause is None: text += " \n LIMIT ALL" - text += " OFFSET " + self.process(_literal_as_binds(select._offset)) + text += " OFFSET " + self.process(select._offset_clause) return text def format_from_hint_text(self, sqltext, table, hint, iscrud): |