java.lang.Object
io.helidon.dbclient.common.AbstractStatement<S,R>
io.helidon.dbclient.mongodb.MongoDbStatementDml
- All Implemented Interfaces:
DbStatement<DbStatementDml,
,Single<Long>> DbStatementDml
DML statement for MongoDB.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
Collection JSON parameter name.protected static final String
Operation JSON parameter name.protected static final String
Projection JSON parameter name: Defines projection to restrict returned fields.protected static final String
Query JSON parameter name.protected static final String
Value JSON parameter name.protected static final JsonReaderFactory
JSON reader factory. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
dbType()
Type of this database to use in interceptor context.doExecute
(Single<DbClientServiceContext> dbContext, CompletableFuture<Void> statementFuture, CompletableFuture<Long> queryFuture) Execute the statement against the database.execute()
Execute this statement using the parameters configured withparams
andaddParams
methods.Statement name.protected DbStatementType
Type of this statement.Methods inherited from class io.helidon.dbclient.common.AbstractStatement
addParam, addParam, clientContext, dbMapperManager, indexedParam, indexedParams, mapperManager, me, namedParam, namedParams, params, params, paramType, statement, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.dbclient.DbStatement
addParam, addParam, indexedParam, namedParam, params, params, params
-
Field Details
-
JSON_OPERATION
Operation JSON parameter name.- See Also:
-
JSON_COLLECTION
Collection JSON parameter name.- See Also:
-
JSON_QUERY
Query JSON parameter name.- See Also:
-
JSON_VALUE
Value JSON parameter name.- See Also:
-
JSON_PROJECTION
Projection JSON parameter name: Defines projection to restrict returned fields.- See Also:
-
READER_FACTORY
JSON reader factory.
-
-
Method Details
-
execute
Description copied from interface:DbStatement
Execute this statement using the parameters configured withparams
andaddParams
methods.- Specified by:
execute
in interfaceDbStatement<DbStatementDml,
Single<Long>> - Overrides:
execute
in classAbstractStatement<DbStatementDml,
Single<Long>> - Returns:
- The result of this statement, never blocking.
-
doExecute
protected Single<Long> doExecute(Single<DbClientServiceContext> dbContext, CompletableFuture<Void> statementFuture, CompletableFuture<Long> queryFuture) Description copied from class:AbstractStatement
Execute the statement against the database.- Specified by:
doExecute
in classAbstractStatement<DbStatementDml,
Single<Long>> - Parameters:
dbContext
- future that completes after all services are invokedstatementFuture
- future that should complete when the statement finishes executionqueryFuture
- future that should complete when the result set is fully read (if one exists), otherwise complete same as statementFuture- Returns:
- result of this db statement.
-
statementType
Description copied from class:AbstractStatement
Type of this statement.- Overrides:
statementType
in classAbstractStatement<DbStatementDml,
Single<Long>> - Returns:
- statement type
-
statementName
Statement name.- Overrides:
statementName
in classAbstractStatement<S extends DbStatement<S,
R>, R> - Returns:
- name of this statement (never null, may be generated)
-
dbType
Description copied from class:AbstractStatement
Type of this database to use in interceptor context.- Specified by:
dbType
in classAbstractStatement<S extends DbStatement<S,
R>, R> - Returns:
- type of this db
-