Interface StreamingPersonReactorRepository
- All Superinterfaces:
GenericRepository<Person,Long>, ReactiveStreamsCrudRepository<Person, Long>, ReactorCrudRepository<Person, Long>
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<Person> list()Stream all Person entities.reactor.core.publisher.Flux<PersonWithIdAndNameDto> Stream a DTO projection (id, name) for all persons.reactor.core.publisher.Flux<Person> queryAll()Queries all Person entities with a fetch size of 1000.reactor.core.publisher.Flux<PersonWithIdAndNameDto> Queries all Person entities as a DTO projection (id, name) with a fetch size of 1000.Methods inherited from interface ReactorCrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findById, save, saveAll, update, updateAll
-
Method Details
-
list
reactor.core.publisher.Flux<Person> list()Stream all Person entities.- Returns:
- a Flux stream of Person entities
-
queryAll
-
listAllDto
@Query("SELECT id, name FROM person") reactor.core.publisher.Flux<PersonWithIdAndNameDto> listAllDto()Stream a DTO projection (id, name) for all persons.- Returns:
- a Flux stream of
PersonWithIdAndNameDtoobjects representing the id and name of all persons
-
queryAllDto
@Query("SELECT id, name FROM person") @Fetch(1000) reactor.core.publisher.Flux<PersonWithIdAndNameDto> queryAllDto()Queries all Person entities as a DTO projection (id, name) with a fetch size of 1000. This method returns a Flux stream ofPersonWithIdAndNameDtoobjects, representing the id and name of all persons, allowing for efficient handling of large datasets by fetching results in batches.- Returns:
- a Flux stream of
PersonWithIdAndNameDtoobjects
-