diff --git a/acacore/database/base.py b/acacore/database/base.py index cc4b19c..ca25751 100644 --- a/acacore/database/base.py +++ b/acacore/database/base.py @@ -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):