]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
sqlite likes OFFSET with LIMIT else its buggy
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Mar 2006 17:14:50 +0000 (17:14 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Mar 2006 17:14:50 +0000 (17:14 +0000)
lib/sqlalchemy/databases/sqlite.py

index 6dc880b05150af4e17c7608ad497d2b759bfefdb..18a97e3f788dddab2cee3bc69f7134d4203fd20e 100644 (file)
@@ -222,6 +222,8 @@ class SQLiteCompiler(ansisql.ANSICompiler):
             if select.limit is None:
                 text += " \n LIMIT -1"
             text += " OFFSET " + str(select.offset)
+        else:
+            text += " OFFSET 0"
         return text
     def binary_operator_string(self, binary):
         if isinstance(binary.type, sqltypes.String) and binary.operator == '+':