]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix sql server version number
authorElkin <elkin@raketa.im>
Thu, 30 Jan 2020 13:19:03 +0000 (16:19 +0300)
committerElkin <elkin@raketa.im>
Thu, 30 Jan 2020 13:19:03 +0000 (16:19 +0300)
lib/sqlalchemy/dialects/mssql/base.py

index 5cbe484a6df235959aa929c6a2ed9c0332621b6d..c112bed2e3e7615ee8c0d2cead99a829e2b2cc9f 100644 (file)
@@ -1660,10 +1660,13 @@ class MSSQLCompiler(compiler.SQLCompiler):
                 )
 
             text = ""
+
             if select._offset_clause is not None:
-                text += "\n OFFSET %s ROWS" % self.process(
-                    select._offset_clause, **kw
-                )
+                offset_str = self.process(select._offset_clause, **kw)
+            else:
+                offset_str = '0'
+            text += "\n OFFSET %s ROWS" % offset_str
+
             if select._limit_clause is not None:
                 text += "\n FETCH NEXT %s ROWS ONLY " % self.process(
                     select._limit_clause, **kw