Interface R2dbcOperations
public interface R2dbcOperations
Operations for R2DBC.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.r2dbc.spi.ConnectionFactory
Obtains the connection factory.<T> @NonNull 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.<T> @NonNull org.reactivestreams.Publisher<T>
withTransaction
(@NonNull ReactiveTransactionStatus<io.r2dbc.spi.Connection> status, ReactiveTransactionOperations.TransactionalCallback<io.r2dbc.spi.Connection, T> handler) Execute the given handler with an existing transaction status.<T> @NonNull org.reactivestreams.Publisher<T>
withTransaction
(ReactiveTransactionOperations.TransactionalCallback<io.r2dbc.spi.Connection, T> handler) Execute the given handler with an existing transaction status.
-
Method Details
-
connectionFactory
@NonNull @NonNull io.r2dbc.spi.ConnectionFactory connectionFactory()Obtains the connection factory.- Returns:
- The connection factory
-
withTransaction
@NonNull <T> @NonNull org.reactivestreams.Publisher<T> withTransaction(@NonNull @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
-
withTransaction
@NonNull <T> @NonNull org.reactivestreams.Publisher<T> withTransaction(@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:
handler
- The handler- Returns:
- A publisher that emits the result type
-
withConnection
@NonNull <T> @NonNull org.reactivestreams.Publisher<T> withConnection(@NonNull @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
-