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

Fix: Pagination to consider limit value while .all() will keep returning all records #281

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

Commits on Jun 25, 2022

  1. Fix: Limit not working on execute()

    Problem?
    Often time in production we don't want to return all matching records instead returning a paginated response based on values of limit and offset is desirable.
    
    What is being fixed?
    Even after setting a limit value it was not working and .all() or .execute() function were returning complete set of records matching the search criterion.
    
    How is it fixed?
    To break away from loop executing the query a condition is added wherein if total number of fetched records is equal or greater than limit.
    If no limit is provided, default value i.e. 10 records will be returned.
    iamvishalkhare authored Jun 25, 2022
    Configuration menu
    Copy the full SHA
    e8bd4ba View commit details
    Browse the repository at this point in the history
  2. Pagination fix to consider limit while returning response

    Vishal authored and Vishal committed Jun 25, 2022
    Configuration menu
    Copy the full SHA
    42adbcf View commit details
    Browse the repository at this point in the history