- java.lang.Object
-
- io.helidon.dbclient.common.AbstractStatement<S,R>
-
- io.helidon.dbclient.mongodb.MongoDbStatementDml
-
- All Implemented Interfaces:
DbStatement<DbStatementDml,Single<Long>>,DbStatementDml
public class MongoDbStatementDml extends AbstractStatement<S,R> implements DbStatementDml
DML statement for MongoDB.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringJSON_COLLECTIONCollection JSON parameter name.protected static StringJSON_OPERATIONOperation JSON parameter name.protected static StringJSON_PROJECTIONProjection JSON parameter name: Defines projection to restrict returned fields.protected static StringJSON_QUERYQuery JSON parameter name.protected static StringJSON_VALUEValue JSON parameter name.protected static JsonReaderFactoryREADER_FACTORYJSON reader factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdbType()Type of this database to use in interceptor context.protected Single<Long>doExecute(Single<DbClientServiceContext> dbContext, CompletableFuture<Void> statementFuture, CompletableFuture<Long> queryFuture)Execute the statement against the database.Single<Long>execute()Execute this statement using the parameters configured withparamsandaddParamsmethods.StringstatementName()Statement name.protected DbStatementTypestatementType()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 Detail
-
JSON_OPERATION
protected static final String JSON_OPERATION
Operation JSON parameter name.- See Also:
- Constant Field Values
-
JSON_COLLECTION
protected static final String JSON_COLLECTION
Collection JSON parameter name.- See Also:
- Constant Field Values
-
JSON_QUERY
protected static final String JSON_QUERY
Query JSON parameter name.- See Also:
- Constant Field Values
-
JSON_VALUE
protected static final String JSON_VALUE
Value JSON parameter name.- See Also:
- Constant Field Values
-
JSON_PROJECTION
protected static final String JSON_PROJECTION
Projection JSON parameter name: Defines projection to restrict returned fields.- See Also:
- Constant Field Values
-
READER_FACTORY
protected static final JsonReaderFactory READER_FACTORY
JSON reader factory.
-
-
Method Detail
-
execute
public Single<Long> execute()
Description copied from interface:DbStatementExecute this statement using the parameters configured withparamsandaddParamsmethods.- Specified by:
executein interfaceDbStatement<DbStatementDml,Single<Long>>- Overrides:
executein 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:AbstractStatementExecute the statement against the database.- Specified by:
doExecutein 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
protected DbStatementType statementType()
Description copied from class:AbstractStatementType of this statement.- Overrides:
statementTypein classAbstractStatement<DbStatementDml,Single<Long>>- Returns:
- statement type
-
statementName
public String statementName()
Statement name.- Overrides:
statementNamein classAbstractStatement<S extends DbStatement<S,R>,R>- Returns:
- name of this statement (never null, may be generated)
-
dbType
protected String dbType()
Description copied from class:AbstractStatementType of this database to use in interceptor context.- Specified by:
dbTypein classAbstractStatement<S extends DbStatement<S,R>,R>- Returns:
- type of this db
-
-