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
FieldsModifier and TypeFieldDescriptionprivate Query
private String
private final CreateTableData
private boolean
private boolean
private boolean
private boolean
Fields inherited from class org.h2.command.ddl.DefineCommand
transactional
Fields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a column to this table.private void
int
getType()
Get the command type as defined in CommandInterfacevoid
setComment
(String comment) void
setGlobalTemporary
(boolean globalTemporary) void
setHidden
(boolean isHidden) void
setIfNotExists
(boolean ifNotExists) void
This temporary table is dropped on commit.void
This temporary table is truncated on commit.void
setPersistData
(boolean persistData) void
setPersistIndexes
(boolean persistIndexes) void
void
setTableEngine
(String tableEngine) void
setTableEngineParams
(ArrayList<String> tableEngineParams) void
setTableName
(String tableName) void
setTemporary
(boolean temporary) void
setWithNoData
(boolean withNoData) long
update()
Execute the statement.Methods inherited from class org.h2.command.ddl.CommandWithColumns
addConstraintCommand, changePrimaryKeysToNotNull, createConstraints, generateSequences, getPrimaryKey
Methods inherited from class org.h2.command.ddl.SchemaCommand
getSchema
Methods inherited from class org.h2.command.ddl.DefineCommand
isReadOnly, isTransactional, queryMeta, setTransactional
Methods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, isCacheable, isQuery, needRecompile, prepare, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString
-
Field Details
-
data
-
ifNotExists
private boolean ifNotExists -
onCommitDrop
private boolean onCommitDrop -
onCommitTruncate
private boolean onCommitTruncate -
asQuery
-
comment
-
withNoData
private boolean withNoData
-
-
Constructor Details
-
CreateTable
-
-
Method Details
-
setQuery
-
setTemporary
public void setTemporary(boolean temporary) -
setTableName
-
addColumn
Description copied from class:CommandWithColumns
Add a column to this table.- Specified by:
addColumn
in classCommandWithColumns
- Parameters:
column
- the column to add
-
getColumns
-
setIfNotExists
public void setIfNotExists(boolean ifNotExists) -
update
public long update()Description copied from class:Prepared
Execute the statement. -
generateColumnsFromQuery
private void generateColumnsFromQuery() -
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
-
setHidden
public void setHidden(boolean isHidden) -
getType
public int getType()Description copied from class:Prepared
Get the command type as defined in CommandInterface
-