- All Implemented Interfaces:
DbStatement<DbStatementDml>,DbStatementDml
MongoDB
DbStatementDml implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringCollection JSON parameter name.protected static final StringOperation JSON parameter name.protected static final StringProjection JSON parameter name: Defines projection to restrict returned fields.protected static final StringQuery JSON parameter name.protected static final StringValue JSON parameter name. -
Method Summary
Modifier and TypeMethodDescriptionlongexecute()Execute this statement using the parameters configured withparamsandaddParamsmethods.insert()ExecuteINSERTstatement using the parameters configured withparamsandaddParamsmethods and return compound result with generated keys.returnColumns(List<String> columnNames) Set column names to be returned from the inserted row or rows from the statement execution usingDbStatementDml.insert().Set auto-generated keys to be returned from the statement execution usingDbStatementDml.insert().Get the statement type.Methods inherited from class io.helidon.dbclient.DbStatementBase
addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, autoClose, context, context, doExecute, identity, indexedParam, namedParam, parameters, params, paramsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.dbclient.DbStatement
addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, addParam, 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:
-
-
Method Details
-
statementType
Description copied from class:DbStatementBaseGet the statement type.- Specified by:
statementTypein classDbStatementBase<DbStatementDml>- Returns:
- statement type
-
execute
public long execute()Description copied from interface:DbStatementDmlExecute this statement using the parameters configured withparamsandaddParamsmethods.- Specified by:
executein interfaceDbStatementDml- Returns:
- the result of this statement
-
insert
Description copied from interface:DbStatementDmlExecuteINSERTstatement using the parameters configured withparamsandaddParamsmethods and return compound result with generated keys.- Specified by:
insertin interfaceDbStatementDml- Returns:
- the result of this statement with generated keys
-
returnGeneratedKeys
Description copied from interface:DbStatementDmlSet auto-generated keys to be returned from the statement execution usingDbStatementDml.insert(). Only one method fromDbStatementDml.returnGeneratedKeys()andDbStatementDml.returnColumns(List)may be used. This feature is database provider specific and some databases require specific columns to be set.- Specified by:
returnGeneratedKeysin interfaceDbStatementDml- Returns:
- updated db statement
-
returnColumns
Description copied from interface:DbStatementDmlSet column names to be returned from the inserted row or rows from the statement execution usingDbStatementDml.insert(). Only one method fromDbStatementDml.returnGeneratedKeys()andDbStatementDml.returnColumns(List)may be used. This feature is database provider specific.- Specified by:
returnColumnsin interfaceDbStatementDml- Parameters:
columnNames- an array of column names indicating the columns that should be returned from the inserted row or rows- Returns:
- updated db statement
-