fix LIMIT OFFSET syntax error
This commit is contained in:
parent
689c578081
commit
c60e17b341
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue