Class DataChangeStatement
java.lang.Object
org.h2.command.Prepared
org.h2.command.dml.DataChangeStatement
- Direct Known Subclasses:
CommandWithValues, FilteredDataChangeStatement, MergeUsing
Data change statement.
-
Field Summary
Fields inherited from class Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDataChangeStatement(SessionLocal session) Creates new instance of DataChangeStatement. -
Method Summary
Modifier and TypeMethodDescriptionabstract StringReturn the name of this statement.abstract TablegetTable()Return the target table.booleanfinal booleanCheck if this command is transactional.final ResultInterfaceGet an empty result set containing the meta data.final longupdate()Execute the statement.abstract longupdate(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode) Execute the statement with specified delta change collector and collection mode.Methods inherited from class Prepared
checkCanceled, checkParameters, collectDependencies, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, getType, isQuery, isReadOnly, needRecompile, prepare, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString
-
Constructor Details
-
DataChangeStatement
Creates new instance of DataChangeStatement.- Parameters:
session- the session
-
-
Method Details
-
getStatementName
Return the name of this statement.- Returns:
- the short name of this statement.
-
getTable
-
isTransactional
public final boolean isTransactional()Description copied from class:PreparedCheck if this command is transactional. If it is not, then it forces the current transaction to commit.- Specified by:
isTransactionalin classPrepared- Returns:
- true if it is
-
queryMeta
Description copied from class:PreparedGet an empty result set containing the meta data. -
isCacheable
public boolean isCacheable()- Overrides:
isCacheablein classPrepared
-
update
-
update
public abstract long update(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode) Execute the statement with specified delta change collector and collection mode.- Parameters:
deltaChangeCollector- target resultdeltaChangeCollectionMode- collection mode- Returns:
- the update count
-