- java.lang.Object
-
- io.helidon.dbclient.mongodb.MongoDbClient
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.dbclient.DbClient
DbClient.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdbType()Type of this database provider (such as jdbc:mysql, mongoDB etc.).<U,T extends Subscribable<U>>
Texecute(Function<DbExecute,T> executor)Execute database statement.<U,T extends Subscribable<U>>
TinTransaction(Function<DbTransaction,T> executor)Execute database statements in transaction.Single<Void>ping()Pings the database, completes when DB is up and ready, completes exceptionally if not.
-
-
-
Method Detail
-
inTransaction
public <U,T extends Subscribable<U>> T inTransaction(Function<DbTransaction,T> executor)
Description copied from interface:DbClientExecute database statements in transaction.- Specified by:
inTransactionin interfaceDbClient- Type Parameters:
U- the type provided by the result typeT- statement execution result type, MUST be either aMultior aSingle, as returned by all APIs of DbClient.- Parameters:
executor- database statement executor, seeDbExecute- Returns:
- statement execution result
-
execute
public <U,T extends Subscribable<U>> T execute(Function<DbExecute,T> executor)
Description copied from interface:DbClientExecute database statement.- Specified by:
executein interfaceDbClient- Type Parameters:
U- the type provided by the result typeT- statement execution result type, MUST be either aMultior aSingle, as returned by all APIs of DbClient- Parameters:
executor- database statement executor, seeDbExecute- Returns:
- statement execution result
-
ping
public Single<Void> ping()
Description copied from interface:DbClientPings the database, completes when DB is up and ready, completes exceptionally if not.
-
-