Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add Pagination on select all #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tinitto opened this issue Dec 16, 2022 · 0 comments
Closed

Add Pagination on select all #20

Tinitto opened this issue Dec 16, 2022 · 0 comments

Comments

@Tinitto
Copy link
Contributor

Tinitto commented Dec 16, 2022

For performance reasons when querying all items for a given model, we need to allow a user to specify a form of pagination

In order to leverage familiarity with the fantastic pydantic_aioredis, we can use skip and limit i.e.

Book.select(limit=10, skip=100)

Note:
limit and skip should be ignored when ids are specified so as to avoid unexpected results.
i.e.

assert Book.select(ids=["Jane Eyre"], limit=0, skip=100) == Book.select(ids=["Jane Eyre"])
Tinitto added a commit that referenced this issue Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant