- 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 String
dbType()
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.<C> Single<C>
unwrap(Class<C> cls)
Unwrap database client internals.
-
-
-
Method Detail
-
inTransaction
public <U,T extends Subscribable<U>> T inTransaction(Function<DbTransaction,T> executor)
Description copied from interface:DbClient
Execute database statements in transaction.- Specified by:
inTransaction
in interfaceDbClient
- Type Parameters:
U
- the type provided by the result typeT
- statement execution result type, MUST be either aMulti
or 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:DbClient
Execute database statement.- Specified by:
execute
in interfaceDbClient
- Type Parameters:
U
- the type provided by the result typeT
- statement execution result type, MUST be either aMulti
or aSingle
, as returned by all APIs of DbClient- Parameters:
executor
- database statement executor, seeDbExecute
- Returns:
- statement execution result
-
dbType
public String dbType()
Description copied from interface:DbClient
Type of this database provider (such as jdbc:mysql, mongoDB etc.).
-
-