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
`protected`
`DataChangeStatement(SessionLocal session)`
Creates new instance of DataChangeStatement.

## Method Summary

Modifier and Type
Method
Description
`abstract String`
`getStatementName()`
Return the name of this statement.
`abstract Table`
`getTable()`
Return the target table.
`boolean`
`isCacheable()`
`final boolean`
`isTransactional()`
Check if this command is transactional.
`final void`
`prepare()`
Prepare this statement.
`final ResultInterface`
`queryMeta()`
Get an empty result set containing the meta data.
`final long`
`update()`
Execute the statement.
`abstract long`
`update(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, isQuery, isReadOnly, isRetryable, isWithParamValues, needRecompile, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### DataChangeStatement

protected DataChangeStatement(SessionLocal session)
Creates new instance of DataChangeStatement.

Parameters:
  `session` - the session

## Method Details

### prepare

public final void prepare()
Description copied from class: `Prepared`
Prepare this statement.

Overrides:
  `prepare` in class `Prepared`

### getStatementName

public abstract 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: `Prepared`
Check if this command is transactional. If it is not, then it forces the current transaction to commit.

Specified by:
  `isTransactional` in class `Prepared`
Returns:
  true if it is

### queryMeta

public final ResultInterface queryMeta()
Description copied from class: `Prepared`
Get an empty result set containing the meta data.

Specified by:
  `queryMeta` in class `Prepared`
Returns:
  the result set

### isCacheable

public boolean isCacheable()

Overrides:
  `isCacheable` in class `Prepared`

### update

public final long update()
Description copied from class: `Prepared`
Execute the statement.

Overrides:
  `update` in class `Prepared`
Returns:
  the update count

### update

public abstract long update(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
Execute the statement with specified delta change collector and collection mode.

Parameters:
  `deltaChangeCollector` - target result
  `deltaChangeCollectionMode` - collection mode
Returns:
  the update count