fix LIMIT OFFSET syntax error

This commit is contained in:
Lex Berezhny 2018-10-09 14:44:26 -04:00
parent 689c578081
commit c60e17b341

View file

@ -84,12 +84,12 @@ def query(select, **constraints):
else:
raise ValueError("order_by must be string or list")
if offset is not None:
sql.append('OFFSET {}'.format(offset))
if limit is not None:
sql.append('LIMIT {}'.format(limit))
if offset is not None:
sql.append('OFFSET {}'.format(offset))
return ' '.join(sql), values