-
Notifications
You must be signed in to change notification settings - Fork 373
FEATURE: Window Scrolling API (Offset/Keyset pagination) [Spring Data JDBC] #2149
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
Open
chrshnv
wants to merge
2
commits into
spring-projects:main
Choose a base branch
from
chrshnv:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21ff326
to
b717a00
Compare
957a9e4
to
66c9da0
Compare
i guess done. awaiting your reviews! |
I have a question about the KeysetScrollPosition specification. Should users use property names from POJO or column names from the database? |
3b9807e
to
9ce9c71
Compare
Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: StatementFactory new mode for scroll api Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: basic keyset pagination support (without directions) Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: test with two keys Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: sorting for keys not in query Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: limit support Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: more optimal pg query Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: remove second compare for one-key query Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: me in headers! Signed-off-by: Artemiy Degtyarev <[email protected]> Signed-off-by: Artemiy Chereshnevvv <[email protected]> code: move to 'ReflectionUtils' Signed-off-by: Artemiy Chereshnevvv <[email protected]> add: unit-test for two key query creation Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: fix query generation for three or more keys Signed-off-by: Artemiy Chereshnevvv <[email protected]> documentation Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: query test fix Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: invalid next scroll position building due to difference in property and column name Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: remove unexpected sort creation when column already in sort Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: use RelationalPersistentProperty.getName() instead of RelationalPersistentProperty.getColumnName().getReference() Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: use RelationalPersistentProperty.getName() instead of RelationalPersistentProperty.getColumnName().getReference() Signed-off-by: Artemiy Chereshnevvv <[email protected]> test: use property name instead of database column Signed-off-by: Artemiy Chereshnevvv <[email protected]> fix: getColumnName.getReference -> getName Signed-off-by: Artemiy Chereshnevvv <[email protected]> code: more beautiful query building Signed-off-by: Artemiy Chereshnevvv <[email protected]> code: fix formatting Signed-off-by: Artemiy Chereshnevvv <[email protected]> Fix: offset scrolling - calculate query offset by page size Signed-off-by: Artemiy Chereshnevvv <[email protected]> Test: add tests for window keyset position after first page Signed-off-by: Artemiy Chereshnevvv <[email protected]>
chrshnv
added a commit
to chrshnv/spring-data-relational
that referenced
this pull request
Oct 9, 2025
Reformat keys extraction code. See spring-projects#2149 Signed-off-by: Artemiy Chereshnevvv <[email protected]>
chrshnv
added a commit
to chrshnv/spring-data-relational
that referenced
this pull request
Oct 9, 2025
Reformat 'applyScrollOrderBy'. See spring-projects#2149 Signed-off-by: Artemiy Chereshnevvv <[email protected]>
Reformat keys extraction code. See spring-projects#2149 Signed-off-by: Artemiy Chereshnevvv <[email protected]> Polishing. Reformat 'applyScrollOrderBy'. See spring-projects#2149 Signed-off-by: Artemiy Chereshnevvv <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an implementation of Window Scrolling API for Spring Data JDBC, providing efficient, index-friendly pagination over ordered datasets.
Unlike traditional offset pagination, the new API uses keyset (window) navigation, which enables constant-time performance even on large tables.
Example query: