Interface R2dbcOperations
-
- All Superinterfaces:
ReactiveTransactionOperations<io.r2dbc.spi.Connection>
public interface R2dbcOperations extends ReactiveTransactionOperations<io.r2dbc.spi.Connection>
Operations for R2DBC.- Since:
- 1.0.0
- Author:
- graemerocher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micronaut.transaction.reactive.ReactiveTransactionOperations
ReactiveTransactionOperations.TransactionalCallback<C,T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.r2dbc.spi.ConnectionFactory
connectionFactory()
Obtains the connection factory.<T> org.reactivestreams.Publisher<T>
withConnection(java.util.function.Function<io.r2dbc.spi.Connection,org.reactivestreams.Publisher<? extends T>> handler)
Execute the given handler with a new connection.<T> org.reactivestreams.Publisher<T>
withTransaction(ReactiveTransactionStatus<io.r2dbc.spi.Connection> status, ReactiveTransactionOperations.TransactionalCallback<io.r2dbc.spi.Connection,T> handler)
Execute the given handler with an existing transaction status.-
Methods inherited from interface io.micronaut.transaction.reactive.ReactiveTransactionOperations
withTransaction, withTransaction
-
-
-
-
Method Detail
-
connectionFactory
@NonNull io.r2dbc.spi.ConnectionFactory connectionFactory()
Obtains the connection factory.- Returns:
- The connection factory
-
withTransaction
@NonNull <T> org.reactivestreams.Publisher<T> withTransaction(@NonNull ReactiveTransactionStatus<io.r2dbc.spi.Connection> status, @NonNull ReactiveTransactionOperations.TransactionalCallback<io.r2dbc.spi.Connection,T> handler)
Execute the given handler with an existing transaction status.- Type Parameters:
T
- The emitted type- Parameters:
status
- An existing in progress transaction statushandler
- The handler- Returns:
- A publisher that emits the result type
-
withConnection
@NonNull <T> org.reactivestreams.Publisher<T> withConnection(@NonNull java.util.function.Function<io.r2dbc.spi.Connection,org.reactivestreams.Publisher<? extends T>> handler)
Execute the given handler with a new connection.- Type Parameters:
T
- The emitted type- Parameters:
handler
- The handler- Returns:
- A publisher that emits the result type
-
-