From: Mike Bayer Date: Mon, 6 Mar 2006 17:14:50 +0000 (+0000) Subject: sqlite likes OFFSET with LIMIT else its buggy X-Git-Tag: rel_0_1_4~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34cd446912bbff2426a6e6a0dd78b490b8c54e43;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git sqlite likes OFFSET with LIMIT else its buggy --- diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 6dc880b051..18a97e3f78 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -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 == '+':