Skip to content

Add basic support for keyset based pagination and scrolling. #2692

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

Merged
merged 4 commits into from
Mar 20, 2023

Conversation

michael-simons
Copy link
Collaborator

See #2691 for description.

Discussed spring-projects/spring-data-commons#2151 and implemented in spring-projects/spring-data-commons#2787 we can build on top and provide basic support for both imperative and reactive repositories.

The support will be available only on the repository level in the first iteration, think

```java
import java.util.UUID;

import org.springframework.data.domain.ScrollPosition;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Window;
import org.springframework.data.neo4j.repository.Neo4jRepository;

public interface ScrollingRepository extends Neo4jRepository<ScrollingEntity, UUID> {
	Window<ScrollingEntity> findTop4By(Sort sort, ScrollPosition position);
}
```

and other derived finder methods that have a limit and a stable sort.

If requested, further support can be added to the templates, too.

Closes #2691.
@michael-simons michael-simons merged commit 64854c5 into main Mar 20, 2023
@michael-simons michael-simons deleted the feat/key-offset branch February 10, 2025 09:16
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