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

Allow disabling previous and next page checks #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StijnKing
Copy link

@StijnKing StijnKing commented May 30, 2023

Problem

When we use this gem it causes two count queries before the actual query happens. But because of performance reasons we want to avoid having these count queries. So I would like to propose this PR (or something similar).

Reason

The previous_page? and next_page? methods in certain cases require a count query in order to determine if the next/previous pages exists. These count queries can be expensive so an option to disable these checks are added.

For backwards compatibility these checks are enabled by default.

The previous_page? and next_page? methods in certain cases
require a count query in order to determine if the next/previous
pages exists. These count queries can be expensive so an option
to disable these checks are added.

For backwards compatibility these checks are enabled by default.

Co-authored-by: adamsosterics <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant