p3t / spring-cursorpaging

The spring-cursorpaging provides an repository fragment interface which can be used to scroll efficiently over large result-sets.
Apache License 2.0
3 stars 1 forks source link

R2DBC support #41

Open yacosta738 opened 2 months ago

yacosta738 commented 2 months ago

R2DBC support is increasingly available in Spring projects, especially for reactive, non-blocking database interactions. Are you considering implementing R2DBC in a specific part of your project, or evaluating it for potential future use?

p3t commented 2 months ago

I can have a look, I think it should be possible, as there is a DatabaseClient supporting the criteria-API.

Would you expect to get something like:

Flux<DataRecord> getDataRecords(PageRequestDto request) {
     // Convert to page-request and return page-content as Flux
}

or

Mono<CollectionModel<DtoDataRecord>> getDataRecords(PageRequestDto request) {
     // Convert to page-request to HATEOS collection-model and return as Mono
}

I tend to use the Flux-variant...