Skip to content
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

Patch paged filter #303

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

holtkamp
Copy link
Contributor

@holtkamp holtkamp commented Aug 7, 2024

When using the Filterable trait, one can choose to use filter() to get a first batch/page of results or filterAll() to get all results.

In some cases it is useful to be able to influence which page of the results to load.

For example, when filtering the SalesInvoices of a Contact and checking them for a specific CustomField (for example a UUID): when a lot of SalesInvoices exist for the Contact, you want to prevent using filterAll() which loads all SalesInvoices at once (which might exhaust the available memory), and go over the results in small batches. To do so, the pagination parameters per_page and page are needed.

Feel free to alter or squash commits...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant