Modifier and Type | Method and Description |
---|---|
static Completable |
inTransactionCompletable(SQLClient client,
java.util.function.Function<SQLConnection,Completable> sourceSupplier)
Generates a
Completable from SQLConnection operations executed inside a transaction. |
static <T> Observable<T> |
inTransactionObservable(SQLClient client,
java.util.function.Function<SQLConnection,Observable<T>> sourceSupplier)
Generates a
Observable from SQLConnection operations executed inside a transaction. |
static <T> Single<T> |
inTransactionSingle(SQLClient client,
java.util.function.Function<SQLConnection,Single<T>> sourceSupplier)
Generates a
Single from SQLConnection operations executed inside a transaction. |
static Completable.Transformer |
txCompletableTransformer(SQLConnection sqlConnection)
Creates a
Completable.Transformer decorating a Completable with transaction management for a given SQLConnection . |
static <T> Observable.Transformer<T,T> |
txObservableTransformer(SQLConnection sqlConnection)
Creates a
Observable.Transformer decorating an Observable with transaction management for a given SQLConnection . |
static <T> Single.Transformer<T,T> |
txSingleTransformer(SQLConnection sqlConnection)
Creates a
Single.Transformer decorating a Single with transaction management for a given SQLConnection . |
static Completable |
usingConnectionCompletable(SQLClient client,
java.util.function.Function<SQLConnection,Completable> sourceSupplier)
Generates a
Completable from SQLConnection operations. |
static <T> Observable<T> |
usingConnectionObservable(SQLClient client,
java.util.function.Function<SQLConnection,Observable<T>> sourceSupplier)
Generates a
Observable from SQLConnection operations. |
static <T> Single<T> |
usingConnectionSingle(SQLClient client,
java.util.function.Function<SQLConnection,Single<T>> sourceSupplier)
Generates a
Single from SQLConnection operations. |
public static <T> Observable.Transformer<T,T> txObservableTransformer(SQLConnection sqlConnection)
Observable.Transformer
decorating an Observable
with transaction management for a given SQLConnection
.
If the upstream Observable
completes (onComplete), the transaction is committed.
If the upstream Observable
emits an error (onError), the transaction is rollbacked.
Eventually, the given SQLConnection
is put back in autocommit mode.
T
- the type of the items emitted by the upstream Observable
sqlConnection
- the SQLConnection
used for database operations and transaction managementObservable.Transformer
decorating an Observable
with transaction managementpublic static <T> Observable<T> inTransactionObservable(SQLClient client, java.util.function.Function<SQLConnection,Observable<T>> sourceSupplier)
Observable
from SQLConnection
operations executed inside a transaction.T
- the type of the items emitted by the Observable
client
- the SQLClient
sourceSupplier
- a user-provided function returning a Observable
generated by interacting with the given SQLConnection
Observable
generated from SQLConnection
operations executed inside a transactionpublic static <T> Single.Transformer<T,T> txSingleTransformer(SQLConnection sqlConnection)
Single.Transformer
decorating a Single
with transaction management for a given SQLConnection
.
If the upstream Single
emits a value (onSuccess), the transaction is committed.
If the upstream Single
emits an error (onError), the transaction is rollbacked.
Eventually, the given SQLConnection
is put back in autocommit mode.
T
- the type of the item emitted by the upstream Single
sqlConnection
- the SQLConnection
used for database operations and transaction managementSingle.Transformer
decorating a Single
with transaction managementpublic static <T> Single<T> inTransactionSingle(SQLClient client, java.util.function.Function<SQLConnection,Single<T>> sourceSupplier)
Single
from SQLConnection
operations executed inside a transaction.T
- the type of the item emitted by the Single
client
- the SQLClient
sourceSupplier
- a user-provided function returning a Single
generated by interacting with the given SQLConnection
Single
generated from SQLConnection
operations executed inside a transactionpublic static Completable.Transformer txCompletableTransformer(SQLConnection sqlConnection)
Completable.Transformer
decorating a Completable
with transaction management for a given SQLConnection
.
If the upstream Completable
completes (onComplete), the transaction is committed.
If the upstream Completable
emits an error (onError), the transaction is rollbacked.
Eventually, the given SQLConnection
is put back in autocommit mode.
sqlConnection
- the SQLConnection
used for database operations and transaction managementCompletable.Transformer
decorating a Completable
with transaction managementpublic static Completable inTransactionCompletable(SQLClient client, java.util.function.Function<SQLConnection,Completable> sourceSupplier)
Completable
from SQLConnection
operations executed inside a transaction.client
- the SQLClient
sourceSupplier
- a user-provided function returning a Completable
generated by interacting with the given SQLConnection
Completable
generated from SQLConnection
operations executed inside a transactionpublic static <T> Observable<T> usingConnectionObservable(SQLClient client, java.util.function.Function<SQLConnection,Observable<T>> sourceSupplier)
Observable
from SQLConnection
operations.T
- the type of the items emitted by the Observable
client
- the SQLClient
sourceSupplier
- a user-provided function returning a Observable
generated by interacting with the given SQLConnection
Observable
generated from SQLConnection
operationspublic static <T> Single<T> usingConnectionSingle(SQLClient client, java.util.function.Function<SQLConnection,Single<T>> sourceSupplier)
Single
from SQLConnection
operations.T
- the type of the item emitted by the Single
client
- the SQLClient
sourceSupplier
- a user-provided function returning a Single
generated by interacting with the given SQLConnection
Single
generated from SQLConnection
operationspublic static Completable usingConnectionCompletable(SQLClient client, java.util.function.Function<SQLConnection,Completable> sourceSupplier)
Completable
from SQLConnection
operations.client
- the SQLClient
sourceSupplier
- a user-provided function returning a Completable
generated by interacting with the given SQLConnection
Completable
generated from SQLConnection
operationsCopyright © 2023 Eclipse. All rights reserved.