Skip to content

Commit

Permalink
database.base:Table.select - fix incorrect position of OFFSET in sele…
Browse files Browse the repository at this point in the history
…ct statement
  • Loading branch information
MatteoCampinoti94 committed Aug 20, 2024
1 parent e6df7ac commit 72ed918
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions acacore/database/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ def select(
order_statements = [f"{c.name if isinstance(c, Column) else c} {s}" for c, s in order_by]
statement += f" ORDER BY {','.join(order_statements)}"

if offset is not None:
statement += f" OFFSET {offset}"

if limit is not None:
statement += f" LIMIT {limit}"

if offset is not None:
statement += f" OFFSET {offset}"

return Cursor(self.connection.execute(statement, parameters), columns, self)

def insert(self, entry: dict[str, Any], exist_ok: bool = False, replace: bool = False):
Expand Down

0 comments on commit 72ed918

Please sign in to comment.