| 限定符和类型 | 方法和说明 |
|---|---|
<T> reactor.core.publisher.Mono<Long> |
count(Class<T> clazz)
Returns the number of entities available.
|
<T> reactor.core.publisher.Mono<Boolean> |
delete(T entity)
Deletes the given entity.
|
<T> reactor.core.publisher.Mono<Integer> |
deleteAll(Class<T> clazz)
Deletes all entities.
|
<T> reactor.core.publisher.Mono<Integer> |
deleteAll(List<T> entities)
Deletes the given entities.
|
<T> reactor.core.publisher.Mono<Boolean> |
deleteById(Class<T> clazz,
@NonNull Object id)
Deletes the entity with the given id.
|
org.springframework.data.r2dbc.core.DatabaseClient.GenericExecuteSpec |
execute(String sql,
Object... params)
Executes SQL with given parameters.
|
<T> reactor.core.publisher.Mono<Boolean> |
existsById(Class<T> clazz,
@NonNull Object id)
Returns whether an entity with the id exists.
|
<T> reactor.core.publisher.Flux<T> |
findAll(Class<T> clazz)
Returns all instances of the type.
|
<T> reactor.core.publisher.Mono<T> |
findById(Class<T> clazz,
@NonNull Object id)
Retrieves an entity by its id.
|
static R2dbc |
of(org.springframework.data.r2dbc.core.DatabaseClient databaseClient,
Type type)
Initializes a
R2dbc instance. |
<T> reactor.core.publisher.Mono<T> |
save(T entity)
Saves a given entity.
|
<T> reactor.core.publisher.Flux<T> |
select(Class<T> clazz,
String sql,
Object... params)
Performs SELECT operation with given SQL and parameters.
|
reactor.core.publisher.Mono<Integer> |
update(String sql,
Object... params)
Performs DELETE/UPDATE/...
|
<T> reactor.core.publisher.Mono<Long> count(Class<T> clazz)
clazz - the entity type.Mono emitting the number of entities.<T> reactor.core.publisher.Mono<Boolean> existsById(Class<T> clazz, @NonNull @NonNull Object id)
clazz - the entity type.id - must not be null.Mono emitting true if an entity with the given id exists, false otherwise.<T> reactor.core.publisher.Mono<T> save(T entity)
entity - must not be null.Mono emitting the saved entity.<T> reactor.core.publisher.Mono<T> findById(Class<T> clazz, @NonNull @NonNull Object id)
clazz - the entity type.id - must not be null.Mono emitting the entity with the given id or Mono.empty() if none found.<T> reactor.core.publisher.Flux<T> findAll(Class<T> clazz)
clazz - the entity type.Flux emitting all entities.<T> reactor.core.publisher.Mono<Boolean> delete(@NonNull T entity)
entity - must not be null.Mono emitting true if success, false otherwise.<T> reactor.core.publisher.Mono<Integer> deleteAll(List<T> entities)
entities - must not be null.Mono the number of entities deleted.<T> reactor.core.publisher.Mono<Boolean> deleteById(Class<T> clazz, @NonNull @NonNull Object id)
clazz - the entity type.id - must not be null.Mono emitting true if success, false otherwise.<T> reactor.core.publisher.Mono<Integer> deleteAll(Class<T> clazz)
clazz - the entity type.Mono the number of entities deleted.<T> reactor.core.publisher.Flux<T> select(Class<T> clazz, String sql, Object... params)
clazz - the entity type.sql - the SQL.params - the parameters. each parameter must not be nullFlux emitting the selected entities.reactor.core.publisher.Mono<Integer> update(String sql, Object... params)
sql - the SQL.params - the parameters. each parameter must not be nullMono the number of entities updated.org.springframework.data.r2dbc.core.DatabaseClient.GenericExecuteSpec execute(String sql, Object... params)
sql - the SQL.params - the parameters. each parameter must not be nullDatabaseClient.GenericExecuteSpec user to decide how to handle the execution result.Copyright © 2019. All rights reserved.