It would be useful if the library provided basic operations like count, exists, delete, findOne and findAll given a criteria, sort or pageable. The interface could look something like this:
public interface R2dbcRepository<T, ID> extends ReactiveCrudRepository<T, ID> {
Mono<Long> count(Criteria criteria);
Mono<Boolean> exists(Criteria criteria);
Mono<Void> delete(Criteria criteria);
Mono<T> findOne(Criteria criteria);
Flux<T> findAll(Criteria criteria);
Flux<T> findAll(Sort sort);
Flux<T> findAll(Criteria criteria, Sort sort);
Mono<Page<T>> findAll(Pageable pageable);
Mono<Page<T>> findAll(Criteria criteria, Pageable pageable);
}
There is support for this kind of methods on spring-data-jpa. It would be cool if r2dbc also supported it. The implementation should be pretty straight forward using the api available on R2dbcEntityOperations, which is already available on the SimpleR2dbcRepository.
It would be useful if the library provided basic operations like count, exists, delete, findOne and findAll given a criteria, sort or pageable. The interface could look something like this:
There is support for this kind of methods on spring-data-jpa. It would be cool if r2dbc also supported it. The implementation should be pretty straight forward using the api available on R2dbcEntityOperations, which is already available on the SimpleR2dbcRepository.