diff --git a/acacore/__version__.py b/acacore/__version__.py index 131942e..8d1c862 100644 --- a/acacore/__version__.py +++ b/acacore/__version__.py @@ -1 +1 @@ -__version__ = "3.0.2" +__version__ = "3.0.3" diff --git a/acacore/database/base.py b/acacore/database/base.py index cc4b19c..d7749df 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 and offset > 0: + 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): diff --git a/pyproject.toml b/pyproject.toml index 59f4d3e..cd172ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "acacore" -version = "3.0.2" +version = "3.0.3" description = "" authors = ["Matteo Campinoti "] license = "GPL-3.0"