Implement page function (#339)
* implement page function Signed-off-by: wiseaidev <business@wiseai.dev> * add unit tests Signed-off-by: wiseaidev <business@wiseai.dev> * fix linter issues Signed-off-by: wiseaidev <business@wiseai.dev>
This commit is contained in:
parent
ac6a75be19
commit
e5e887229a
2 changed files with 20 additions and 0 deletions
|
@ -760,6 +760,9 @@ class FindQuery:
|
|||
return await query.execute()
|
||||
return await self.execute()
|
||||
|
||||
async def page(self, offset=0, limit=10):
|
||||
return await self.copy(offset=offset, limit=limit).execute()
|
||||
|
||||
def sort_by(self, *fields: str):
|
||||
if not fields:
|
||||
return self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue