From 4af172b644d90f1bcab3de2bd0501a9cf50dc1d5 Mon Sep 17 00:00:00 2001 From: Dobes Vandermeer Date: Fri, 25 Apr 2014 10:42:12 -0700 Subject: Use _offset_clause and _limit_clause, which are always Visitable and usually a BindParameter, instead of _offset and _limit in GenerativeSelect. --- lib/sqlalchemy/dialects/postgresql/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') 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): -- cgit v1.2.1