Skip to content

Commit 5ca59d4

Browse files
committed
fixes #27
1 parent ecc0592 commit 5ca59d4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[DEFAULT]
22
repo = sqlite-minutils
33
lib_name = sqlite-minutils
4-
version = 3.37.0.post5
4+
version = 4.0.0
55
min_python = 3.8
66
license = apache2
77
black_formatting = False

sqlite_minutils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "3.37.0.post5"
1+
__version__ = "4.0.0"
22
from .db import *
33

sqlite_minutils/db.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,12 @@ def attach(self, alias: str, filepath: Union[str, pathlib.Path]):
404404
).strip()
405405
self.execute(attach_sql)
406406

407+
def fetchone(self, sql:str, where_args: Optional[Union[Iterable, dict]] = None):
408+
"""
409+
Execute ``sql`` and return a single row result
410+
"""
411+
return self.execute(sql, where_args or []).fetchone()[0]
412+
407413
def query(
408414
self, sql: str, params: Optional[Union[Iterable, dict]] = None
409415
) -> Generator[dict, None, None]:

0 commit comments

Comments
 (0)