Class Update
java.lang.Object
org.h2.command.Prepared
org.h2.command.dml.DataChangeStatement
org.h2.command.dml.FilteredDataChangeStatement
org.h2.command.dml.Update
This class represents the statement
UPDATE
-
Field Summary
FieldsFields inherited from class FilteredDataChangeStatement
condition, fetchExpr, targetTableFilterFields inherited from class Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectDependencies(HashSet<DbObject> dependencies) Find and collect all DbObjects, this Prepared depends on.(package private) static voiddoUpdate(Prepared prepared, SessionLocal session, Table table, LocalResult rows) getPlanSQL(int sqlFlags) Get the SQL statement with the execution plan.Return the name of this statement.intgetType()Get the command type as defined in CommandInterfacevoidprepare()Prepare this statement.voidsetFromTableFilter(TableFilter tableFilter) (package private) voidsetOnDuplicateKeyInsert(Insert onDuplicateKeyInsert) voidsetSetClauseList(SetClauseList setClauseList) longupdate(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode) Execute the statement with specified delta change collector and collection mode.Methods inherited from class FilteredDataChangeStatement
appendFilterCondition, getCondition, getTable, getTableFilter, nextRow, setCondition, setFetch, setTableFilterMethods inherited from class DataChangeStatement
isCacheable, isTransactional, queryMeta, updateMethods inherited from class Prepared
checkCanceled, checkParameters, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getSession, getSimpleSQL, getSQL, getSQLTokens, isQuery, isReadOnly, needRecompile, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString
-
Field Details
-
setClauseList
-
onDuplicateKeyInsert
-
fromTableFilter
-
-
Constructor Details
-
Update
-
-
Method Details
-
setSetClauseList
-
setFromTableFilter
-
update
public long update(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode) Description copied from class:DataChangeStatementExecute the statement with specified delta change collector and collection mode.- Specified by:
updatein classDataChangeStatement- Parameters:
deltaChangeCollector- target resultdeltaChangeCollectionMode- collection mode- Returns:
- the update count
-
doUpdate
-
getPlanSQL
Description copied from class:PreparedGet the SQL statement with the execution plan.- Overrides:
getPlanSQLin classPrepared- Parameters:
sqlFlags- formatting flags- Returns:
- the execution plan
-
prepare
-
getType
-
getStatementName
Description copied from class:DataChangeStatementReturn the name of this statement.- Specified by:
getStatementNamein classDataChangeStatement- Returns:
- the short name of this statement.
-
collectDependencies
Description copied from class:PreparedFind and collect all DbObjects, this Prepared depends on.- Overrides:
collectDependenciesin classPrepared- Parameters:
dependencies- collection of dependencies to populate
-
getOnDuplicateKeyInsert
-
setOnDuplicateKeyInsert
-