Skip to content

Commit 7c4e815

Browse files
authored
Merge pull request #30 from igorbenav/minor-fixes
corrected crud docs and type hints
2 parents 10d1e07 + d91d3ed commit 7c4e815

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/crud/crud_base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def get(
5757
db: AsyncSession,
5858
schema_to_select: Type[BaseModel] | None = None,
5959
**kwargs
60-
) -> ModelType | None:
60+
) -> Row | None:
6161
"""
6262
Fetch a single record based on filters.
6363
@@ -72,7 +72,7 @@ async def get(
7272
7373
Returns
7474
-------
75-
ModelType | None
75+
Row | None
7676
The fetched database row or None if not found.
7777
"""
7878
to_select = _extract_matching_columns_from_schema(model=self._model, schema=schema_to_select)
@@ -89,7 +89,7 @@ async def get_multi(
8989
limit: int = 100,
9090
schema_to_select: Type[BaseModel] | None = None,
9191
**kwargs
92-
) -> List[ModelType]:
92+
) -> List[Row]:
9393
"""
9494
Fetch multiple records based on filters.
9595
@@ -108,7 +108,7 @@ async def get_multi(
108108
109109
Returns
110110
-------
111-
List[ModelType]
111+
List[Row]
112112
List of fetched database rows.
113113
"""
114114
to_select = _extract_matching_columns_from_schema(model=self._model, schema=schema_to_select)

0 commit comments

Comments
 (0)