Readd fetch_all, since it was removed by mistake by the previous commit.
This commit is contained in:
@@ -186,7 +186,7 @@ def _convert_record_to_object(class_: type, record: Tuple[Any], field_names: Lis
|
|||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
||||||
def fetch_when(class_: type, condition: str) -> tuple:
|
def fetch_if(class_: type, condition: str) -> tuple:
|
||||||
"""
|
"""
|
||||||
Fetch all class_ type variables from the bound db,
|
Fetch all class_ type variables from the bound db,
|
||||||
provided they fit the given condition
|
provided they fit the given condition
|
||||||
@@ -215,7 +215,7 @@ def fetch_range(class_: type, range_: range) -> tuple:
|
|||||||
return tuple(fetch_from(class_, obj_id) for obj_id in range_ if is_fetchable(class_, obj_id))
|
return tuple(fetch_from(class_, obj_id) for obj_id in range_ if is_fetchable(class_, obj_id))
|
||||||
|
|
||||||
|
|
||||||
def fetch_if(class_: type) -> tuple:
|
def fetch_all(class_: type) -> tuple:
|
||||||
"""
|
"""
|
||||||
Fetchall the records in the bound database.
|
Fetchall the records in the bound database.
|
||||||
:param class_: Class of the records.
|
:param class_: Class of the records.
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="datalite", # Replace with your own username
|
name="datalite", # Replace with your own username
|
||||||
version="0.2",
|
version="0.2.1",
|
||||||
author="Ege Ozkan",
|
author="Ege Ozkan",
|
||||||
author_email="egeemirozkan24@gmail.com",
|
author_email="egeemirozkan24@gmail.com",
|
||||||
description="A small package that binds dataclasses to an sqlite database",
|
description="A small package that binds dataclasses to an sqlite database",
|
||||||
|
|||||||
Reference in New Issue
Block a user