Skip to content

Commit f6c76ac

Browse files
committed
implement page function
Signed-off-by: wiseaidev <[email protected]>
1 parent dcd84e0 commit f6c76ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aredis_om/model/model.py

+3
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,9 @@ async def all(self, batch_size=10):
760760
return await query.execute()
761761
return await self.execute()
762762

763+
async def page(self, offset=0, limit=10):
764+
return await self.copy(offset=offset, limit=limit).execute()
765+
763766
def sort_by(self, *fields: str):
764767
if not fields:
765768
return self

0 commit comments

Comments
 (0)