Interface R2dbcOperations
- All Superinterfaces:
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
Modifier and TypeMethodDescriptionio.r2dbc.spi.ConnectionFactory
Obtains the connection factory.<T> org.reactivestreams.Publisher<T>
withConnection
(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 Details
-
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 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
-