Package org.h2.command.dml
Class DataChangeStatement
- java.lang.Object
-
- org.h2.command.Prepared
-
- org.h2.command.dml.DataChangeStatement
-
- Direct Known Subclasses:
CommandWithValues,Delete,MergeUsing,Update
public abstract class DataChangeStatement extends Prepared
Data change statement.
-
-
Field Summary
-
Fields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDataChangeStatement(SessionLocal session)Creates new instance of DataChangeStatement.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetStatementName()Return the name of this statement.abstract TablegetTable()Return the target table.booleanisCacheable()booleanisTransactional()Check if this command is transactional.protected RowlockAndRecheckCondition(TableFilter targetTableFilter, Expression condition)voidprepare()Prepare this statement.ResultInterfacequeryMeta()Get an empty result set containing the metadata.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 org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, getType, invalidateCachedResult, isQuery, isReadOnly, isRetryable, isWithParamValues, needRecompile, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString
-
-
-
-
Constructor Detail
-
DataChangeStatement
protected DataChangeStatement(SessionLocal session)
Creates new instance of DataChangeStatement.- Parameters:
session- the session
-
-
Method Detail
-
prepare
public final void prepare()
Description copied from class:PreparedPrepare this statement.
-
getStatementName
public abstract java.lang.String getStatementName()
Return the name of this statement.- Returns:
- the short name of this statement.
-
getTable
public abstract Table getTable()
Return the target table.- Returns:
- the target table
-
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
public final ResultInterface queryMeta()
Description copied from class:PreparedGet an empty result set containing the metadata.
-
isCacheable
public boolean isCacheable()
- Overrides:
isCacheablein classPrepared
-
update
public final long update()
Description copied from class:PreparedExecute the statement.
-
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
-
lockAndRecheckCondition
protected final Row lockAndRecheckCondition(TableFilter targetTableFilter, Expression condition)
-
-