Package org.h2.command.ddl

# Class DefineCommand

java.lang.Object
org.h2.command.Prepared
org.h2.command.ddl.DefineCommand

Direct Known Subclasses:
  `AlterIndexRename`, `AlterSchemaRename`, `AlterUser`, `AlterView`, `Analyze`, `CreateRole`, `CreateSchema`, `CreateUser`, `DeallocateProcedure`, `DropDatabase`, `DropRole`, `DropSchema`, `DropTable`, `DropUser`, `GrantRevoke`, `PrepareProcedure`, `SchemaCommand`, `SetComment`, `TruncateTable`

public abstract class DefineCommand extends Prepared
This class represents a non-transaction statement, for example a CREATE or DROP.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`transactional`
The transactional behavior.

### Fields inherited from class org.h2.command.Prepared

`create, parameters, prepareAlways, session, sqlStatement, sqlTokens`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isReadOnly()`
Check if this command is read only.
`boolean`
`isRetryable()`
Returns is this command can be repeated on locking failure.
`boolean`
`isTransactional()`
Check if this command is transactional.
`ResultInterface`
`queryMeta()`
Get an empty result set containing the metadata.
`void`
`setTransactional(boolean transactional)`

### Methods inherited from class org.h2.command.Prepared

`checkCanceled, checkParameters, collectDependencies, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, getType, invalidateCachedResult, isCacheable, isQuery, isWithParamValues, needRecompile, prepare, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString, update`

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

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

## Field Details

### transactional

protected boolean transactional
The transactional behavior. The default is disabled, meaning the command commits an open transaction.

## Method Details

### isReadOnly

public boolean isReadOnly()
Description copied from class: `Prepared`
Check if this command is read only.

Overrides:
  `isReadOnly` in class `Prepared`
Returns:
  true if it is

### queryMeta

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

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

### setTransactional

public void setTransactional(boolean transactional)

### isTransactional

public 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

### isRetryable

public boolean isRetryable()
Description copied from class: `Prepared`
Returns is this command can be repeated on locking failure.

Overrides:
  `isRetryable` in class `Prepared`
Returns:
  is this command can be repeated on locking failure