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
-
-
Constructor Summary
Constructors Constructor Description DefineCommand(SessionLocal session)
Create a new command for the given session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isReadOnly()
Check if this command is read only.boolean
isTransactional()
Check if this command is transactional.ResultInterface
queryMeta()
Get an empty result set containing the meta data.void
setTransactional(boolean transactional)
-
Methods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, getType, isCacheable, isQuery, needRecompile, prepare, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString, update
-
-
-
-
Constructor Detail
-
DefineCommand
DefineCommand(SessionLocal session)
Create a new command for the given session.- Parameters:
session
- the session
-
-
Method Detail
-
isReadOnly
public boolean isReadOnly()
Description copied from class:Prepared
Check if this command is read only.- Overrides:
isReadOnly
in classPrepared
- Returns:
- true if it is
-
queryMeta
public ResultInterface queryMeta()
Description copied from class:Prepared
Get an empty result set containing the meta data.
-
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 classPrepared
- Returns:
- true if it is
-
-