Files
spring-data-demo/pagination/output/11-offset-then-keyset-same-method-4.1.2.txt
T

12 lines
754 B
Plaintext

Spring Data JPA: 4.1.2
# one fresh context, one repository method: findFirst10ByCategoryOrderByIdAsc("books", position)
1. keyset, initial -> book-1..book-10
2. keyset, after book-10 -> book-11..book-20
3. offset, initial -> book-1..book-10
4. offset, after row 10 -> book-11..book-20
5. keyset, after book-10 again -> book-1..book-10 (step 2 returned book-11..book-20)
statement for step 5: select p1_0.id,p1_0.category,p1_0.name,p1_0.price from product p1_0 where p1_0.category=? order by p1_0.id fetch first ? rows only
# a different method, findFirst5ByCategoryOrderByIdDesc, after the offset calls above
keyset initial -> book-25..book-21, keyset after book-21 -> book-20..book-16