Skip to content

Commit

Permalink
Add acount method on CursorPage
Browse files Browse the repository at this point in the history
patrick91 committed Jun 14, 2024
1 parent 9a87cd0 commit a98e8df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cursor_pagination.py
Original file line number Diff line number Diff line change
@@ -36,6 +36,9 @@ def __getitem__(self, key):
def __repr__(self):
return '<Page: [%s%s]>' % (', '.join(repr(i) for i in self.items[:21]), ' (remaining truncated)' if len(self.items) > 21 else '')

async def acount(self):
return await self.items.acount()


class CursorPaginator(object):
delimiter = '|'

0 comments on commit a98e8df

Please sign in to comment.