laravel-oci8 icon indicating copy to clipboard operation
laravel-oci8 copied to clipboard

Fixing problem with limit and offset in oracle 11g

Open nathanfeitoza opened this issue 4 years ago • 1 comments

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;

nathanfeitoza avatar Apr 29 '21 02:04 nathanfeitoza

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

yajra avatar Apr 29 '21 09:04 yajra