Skip to content

Add Pagination on select all #20

@Tinitto

Description

@Tinitto

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"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions