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

Fixing problem with limit and offset in oracle 11g #651

Closed
wants to merge 4 commits into from

Conversation

nathanfeitoza
Copy link

@nathanfeitoza nathanfeitoza commented Apr 29, 2021

This PR fix the problem with limit and offset in oracle 11g using between in comparer rn. Changing the calculus in compileRowConstraint, the change try create pagination in query, eg:

  • limit = 30
  • offset (page) = 1

The calculus create the sequence:
t2.rn between 1 and 30

And, if used offset (page) = 2 will have

t2.rn between 31 and 60

The math formula is:

start = offset * limit;
finish = start + limit;

@yajra
Copy link
Owner

yajra commented Apr 29, 2021

Can you please provide some snippets to reproduce the issue that this PR fixes? Or some tests would be better if possible. Thanks!

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.

2 participants