- All Superinterfaces:
DbStatement<DbStatementDml>
- All Known Implementing Classes:
MongoDbStatementDml
Data Manipulation Language (DML) database statement.
A DML statement modifies records in the database and returns the number of modified records.
-
Method Summary
Modifier and TypeMethodDescriptionlong
execute()
Execute this statement using the parameters configured withparams
andaddParams
methods.insert()
ExecuteINSERT
statement using the parameters configured withparams
andaddParams
methods 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 usinginsert()
.Set auto-generated keys to be returned from the statement execution usinginsert()
.Methods 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
-
Method Details
-
execute
long execute()Execute this statement using the parameters configured withparams
andaddParams
methods.- Returns:
- the result of this statement
-
insert
DbResultDml insert()ExecuteINSERT
statement using the parameters configured withparams
andaddParams
methods and return compound result with generated keys.- Returns:
- the result of this statement with generated keys
-
returnGeneratedKeys
DbStatementDml returnGeneratedKeys()Set auto-generated keys to be returned from the statement execution usinginsert()
. Only one method fromreturnGeneratedKeys()
andreturnColumns(List)
may be used. This feature is database provider specific and some databases require specific columns to be set.- Returns:
- updated db statement
-
returnColumns
Set column names to be returned from the inserted row or rows from the statement execution usinginsert()
. Only one method fromreturnGeneratedKeys()
andreturnColumns(List)
may be used. This feature is database provider specific.- Parameters:
columnNames
- an array of column names indicating the columns that should be returned from the inserted row or rows- Returns:
- updated db statement
-