fix: dont use query for children total count

This commit is contained in:
relikd
2022-11-25 19:18:02 +01:00
parent 521ac39a83
commit 4b63fae4d6
4 changed files with 23 additions and 9 deletions

View File

@@ -58,6 +58,11 @@ class FixedRecordsQuery(Query):
return len(self.__child_paths)
return super().count() # type: ignore[no-any-return]
@property
def total(self) -> int:
''' Return total entries count (without any filter). '''
return len(self.__child_paths)
def get(self, path: str, page_num: Optional[int] = None) \
-> Optional['Record']:
''' Return Record with given path '''