]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fixed limit/offset compilation for postgres
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Jun 2007 20:00:44 +0000 (20:00 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 24 Jun 2007 20:00:44 +0000 (20:00 +0000)
lib/sqlalchemy/databases/postgres.py

index ea92cf7fd2d825c41fc1a3673244836fdb487eca..15cdc23e2a954d0b9a5acd5eb2b77d4938b75b1e 100644 (file)
@@ -414,12 +414,12 @@ class PGCompiler(ansisql.ANSICompiler):
 
     def limit_clause(self, select):
         text = ""
-        if select.limit is not None:
-            text +=  " \n LIMIT " + str(select.limit)
-        if select.offset is not None:
-            if select.limit is None:
+        if select._limit is not None:
+            text +=  " \n LIMIT " + str(select._limit)
+        if select._offset is not None:
+            if select._limit is None:
                 text += " \n LIMIT ALL"
-            text += " OFFSET " + str(select.offset)
+            text += " OFFSET " + str(select._offset)
         return text
 
     def visit_select_precolumns(self, select):