Skip to content

Add support for Window scrolling queries #1605

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
chrisbuettgen opened this issue Sep 6, 2023 · 2 comments
Open

Add support for Window scrolling queries #1605

chrisbuettgen opened this issue Sep 6, 2023 · 2 comments
Labels
type: enhancement A general enhancement

Comments

@chrisbuettgen
Copy link

Hi there,
originally I was working with Spring for GraphQL when I stumbled upon this problem:

I wanted to perform a query with a Reactive Repository returning a windowed result, but it would complain about a "non unique result". Most likely because the return type of the Repsitory method is Mono<Window<Book>> (I need the Window for GraphQL), but the query itself returns several rows.

interface BookRepository : ReactiveCrudRepository<Book, Long>, ReactiveQueryByExampleExecutor<Book> {

    fun findAllByOrderByName(example: Example<Book>, position: ScrollPosition): Mono<Window<Book>>

}

Am I missing something, or does Window not work in a Reactive context (yet)?

Find the attached source code with a Unit test to illustrate the problem.
reactive_window_query.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 6, 2023
@mp911de mp911de changed the title Window not working in Reactive context? Add support for Window scrolling queries Sep 11, 2023
@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 11, 2023
@mp911de
Copy link
Member

mp911de commented Sep 12, 2023

Spring Data R2DBC does not yet support keyset scrolling. This is something we want to implement in the future.

@mzvankovich
Copy link

Spring Data R2DBC does not yet support keyset scrolling. This is something we want to implement in the future.

Hello @mp911de does Spring Data R2DBC still not support offset/keyset scrolling? How can it be properly used for ReactiveCrudRepository? I'm particularly interested in getting it to work for r2dbc-postgresql driver. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants