Class MergeUsing
java.lang.Object
org.h2.command.Prepared
org.h2.command.dml.DataChangeStatement
org.h2.command.dml.MergeUsing
This class represents the statement syntax
MERGE INTO table alias USING...
It does not replace the MERGE INTO... KEYS... form.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassAbstract WHEN command of the MERGE statement.final classfinal classfinal class -
Field Summary
Fields inherited from class Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds WHEN command.voidcollectDependencies(HashSet<DbObject> dependencies) Find and collect all DbObjects, this Prepared depends on.getPlanSQL(int sqlFlags) Get the SQL statement with the execution plan.Return the name of this statement.getTable()Return the target table.intgetType()Get the command type as defined in CommandInterfacegetWhen()voidprepare()Prepare this statement.voidsetOnCondition(Expression condition) voidsetSourceTableFilter(TableFilter sourceTableFilter) voidsetTargetTableFilter(TableFilter targetTableFilter) longupdate(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode) Execute the statement with specified delta change collector and collection mode.Methods 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
-
Constructor Details
-
MergeUsing
-
-
Method Details
-
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
-
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
-
setSourceTableFilter
-
getSourceTableFilter
-
setOnCondition
-
getOnCondition
-
getWhen
-
addWhen
Adds WHEN command.- Parameters:
w- new WHEN command to add (update, delete or insert).
-
getTable
Description copied from class:DataChangeStatementReturn the target table.- Specified by:
getTablein classDataChangeStatement- Returns:
- the target table
-
setTargetTableFilter
-
getTargetTableFilter
-
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
-