Package org.h2.command.ddl
Class CreateTable
java.lang.Object
org.h2.command.Prepared
org.h2.command.ddl.DefineCommand
org.h2.command.ddl.SchemaCommand
org.h2.command.ddl.CommandWithColumns
org.h2.command.ddl.CreateTable
This class represents the statement
CREATE TABLE
-
Field Summary
Fields inherited from class org.h2.command.ddl.DefineCommand
transactionalFields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a column to this table.intgetType()Get the command type as defined in CommandInterfacevoidsetComment(String comment) voidsetGlobalTemporary(boolean globalTemporary) voidsetIfNotExists(boolean ifNotExists) voidThis temporary table is dropped on commit.voidThis temporary table is truncated on commit.voidsetPersistData(boolean persistData) voidsetPersistIndexes(boolean persistIndexes) voidvoidsetTableEngine(String tableEngine) voidsetTableEngineParams(ArrayList<String> tableEngineParams) voidsetTableName(String tableName) voidsetTemporary(boolean temporary) voidsetWithNoData(boolean withNoData) longupdate()Execute the statement.Methods inherited from class org.h2.command.ddl.CommandWithColumns
addConstraintCommand, changePrimaryKeysToNotNull, createConstraints, generateSequences, getPrimaryKeyMethods inherited from class org.h2.command.ddl.SchemaCommand
getSchemaMethods inherited from class org.h2.command.ddl.DefineCommand
isReadOnly, isRetryable, isTransactional, queryMeta, setTransactionalMethods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, invalidateCachedResult, isCacheable, isQuery, isWithParamValues, needRecompile, prepare, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString
-
Constructor Details
-
CreateTable
-
-
Method Details
-
setQuery
-
setTemporary
public void setTemporary(boolean temporary) -
setTableName
-
addColumn
Description copied from class:CommandWithColumnsAdd a column to this table.- Specified by:
addColumnin classCommandWithColumns- Parameters:
column- the column to add
-
getColumns
-
setIfNotExists
public void setIfNotExists(boolean ifNotExists) -
update
public long update()Description copied from class:PreparedExecute the statement. -
setPersistIndexes
public void setPersistIndexes(boolean persistIndexes) -
setGlobalTemporary
public void setGlobalTemporary(boolean globalTemporary) -
setOnCommitDrop
public void setOnCommitDrop()This temporary table is dropped on commit. -
setOnCommitTruncate
public void setOnCommitTruncate()This temporary table is truncated on commit. -
setComment
-
setPersistData
public void setPersistData(boolean persistData) -
setWithNoData
public void setWithNoData(boolean withNoData) -
setTableEngine
-
setTableEngineParams
-
getType
public int getType()Description copied from class:PreparedGet the command type as defined in CommandInterface
-