| 构造器和说明 |
|---|
Postgres(org.springframework.data.r2dbc.core.DatabaseClient databaseClient) |
| 限定符和类型 | 方法和说明 |
|---|---|
<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.
|
<T> reactor.core.publisher.Mono<T> |
save(T entity)
1.1: different implementations for cases of No Primary Key, Single Primary Key and Composite Primary Key.
|
<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/...
|
public <T> reactor.core.publisher.Mono<Long> count(Class<T> clazz)
R2dbcpublic <T> reactor.core.publisher.Mono<Boolean> existsById(Class<T> clazz, @NonNull @NonNull Object id)
R2dbcexistsById 在接口中 R2dbcclazz - the entity type.id - must not be null.Mono emitting true if an entity with the given id exists, false otherwise.public <T> reactor.core.publisher.Mono<T> save(@NonNull
T entity)
public <T> reactor.core.publisher.Mono<T> findById(Class<T> clazz, @NonNull @NonNull Object id)
R2dbcpublic <T> reactor.core.publisher.Flux<T> findAll(Class<T> clazz)
R2dbcpublic <T> reactor.core.publisher.Mono<Boolean> delete(@NonNull T entity)
R2dbcpublic <T> reactor.core.publisher.Mono<Integer> deleteAll(List<T> entities)
R2dbcpublic <T> reactor.core.publisher.Mono<Boolean> deleteById(Class<T> clazz, @NonNull @NonNull Object id)
R2dbcdeleteById 在接口中 R2dbcclazz - the entity type.id - must not be null.Mono emitting true if success, false otherwise.public <T> reactor.core.publisher.Mono<Integer> deleteAll(Class<T> clazz)
R2dbcpublic <T> reactor.core.publisher.Flux<T> select(Class<T> clazz, String sql, Object... params)
R2dbcpublic reactor.core.publisher.Mono<Integer> update(String sql, Object... params)
R2dbcCopyright © 2019. All rights reserved.