class AlterTableNode extends DDLStatementNode
Modifier and Type | Field and Description |
---|---|
TableDescriptor |
baseTable |
int |
behavior |
private int |
changeType |
protected ColumnInfo[] |
colInfos |
boolean |
compressTable |
protected ConstraintConstantAction[] |
conActions |
boolean |
defragment |
private boolean |
dropStatistics
dropStatistics will indicate that we are here for dropping the
statistics.
|
private boolean |
dropStatisticsAll
The flag dropStatisticsAll will tell if we are going to drop the
statistics of all indexes or just one index on a table.
|
private java.lang.String |
indexNameForStatistics
If statistic is getting updated/dropped for just one index, then
indexNameForStatistics will tell the name of the specific index
whose statistics need to be updated/dropped.
|
(package private) char |
lockGranularity |
protected int |
numConstraints |
boolean |
purge |
protected SchemaDescriptor |
schemaDescriptor |
boolean |
sequential |
TableElementList |
tableElementList |
boolean |
truncateEndOfTable |
private boolean |
truncateTable |
private boolean |
updateStatistics
updateStatistics will indicate that we are here for updating the
statistics.
|
private boolean |
updateStatisticsAll
The flag updateStatisticsAll will tell if we are going to update the
statistics of all indexes or just one index on a table.
|
ADD_TYPE, DROP_STATISTICS, DROP_TYPE, implicitCreateSchema, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPE, UPDATE_STATISTICS
EMPTY_TD_LIST, NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
AlterTableNode(TableName tableName,
boolean purge,
boolean defragment,
boolean truncateEndOfTable,
ContextManager cm)
Constructor for INPLACE COMPRESS
|
AlterTableNode(TableName tableName,
boolean sequential,
ContextManager cm)
Constructor for COMPRESS using temporary tables
rather than in place compress
|
AlterTableNode(TableName tableName,
ContextManager cm)
Constructor for TRUNCATE TABLE
|
AlterTableNode(TableName tableName,
int changeType,
boolean statsAll,
java.lang.String indexName,
ContextManager cm)
Constructor for UPDATE_STATISTICS or DROP_STATISTICS
|
AlterTableNode(TableName tableName,
int changeType,
TableElementList impactedElements,
char lockGranularity,
int behavior,
ContextManager cm)
Constructor for ADD_TYPE, DROP_TYPE, MODIFY_TYPE and LOCK_TYPE
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node.
|
void |
bindStatement()
Bind this AlterTableNode.
|
void |
genColumnInfo()
Generate the ColumnInfo argument for the constant action.
|
int |
getChangeType() |
ConstantAction |
makeConstantAction()
Create the Constant information that will drive the guts of Execution.
|
private void |
prepConstantAction()
Generate arguments to constant action.
|
(package private) void |
printSubNodes(int depth)
Prints the sub-nodes of this object.
|
boolean |
referencesSessionSchema()
Return true if the node references SESSION schema tables (temporary or permanent)
|
java.lang.String |
statementToString() |
java.lang.String |
toString()
Convert this object to a String.
|
activationKind, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, initAndCheck, isAtomic, makeFromList
executeSchemaName, executeStatementName, generate, getCursorInfo, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement, updateIndexStatisticsFor
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
public TableElementList tableElementList
char lockGranularity
private boolean updateStatistics
private boolean updateStatisticsAll
private boolean dropStatistics
private boolean dropStatisticsAll
private java.lang.String indexNameForStatistics
public boolean compressTable
public boolean sequential
public boolean purge
public boolean defragment
public boolean truncateEndOfTable
public int behavior
public TableDescriptor baseTable
protected int numConstraints
private int changeType
private boolean truncateTable
protected SchemaDescriptor schemaDescriptor
protected ColumnInfo[] colInfos
protected ConstraintConstantAction[] conActions
AlterTableNode(TableName tableName, ContextManager cm) throws StandardException
tableName
- The name of the table being truncatedcm
- Context managerStandardException
AlterTableNode(TableName tableName, boolean sequential, ContextManager cm) throws StandardException
tableName
- The name of the table being alteredsequential
- Whether or not the COMPRESS is SEQUENTIALcm
- Context managerStandardException
- Thrown on errorAlterTableNode(TableName tableName, boolean purge, boolean defragment, boolean truncateEndOfTable, ContextManager cm) throws StandardException
tableName
- The name of the table being alteredpurge
- PURGE during INPLACE COMPRESS?defragment
- DEFRAGMENT during INPLACE COMPRESS?truncateEndOfTable
- TRUNCATE END during INPLACE COMPRESS?cm
- Context managerStandardException
- Thrown on errorAlterTableNode(TableName tableName, int changeType, boolean statsAll, java.lang.String indexName, ContextManager cm) throws StandardException
tableName
- The name of the table being alteredchangeType
- update or drop statisticsstatsAll
- true
means update or drop
the statistics of all the indexes on the table.
false
means update or drop the statistics of
only the index name provided by next parameter.indexName
- Name of the index for which statistics is to be updated
or droppedcm
- Context managerStandardException
AlterTableNode(TableName tableName, int changeType, TableElementList impactedElements, char lockGranularity, int behavior, ContextManager cm) throws StandardException
tableName
- The name of the table being alteredchangeType
- add, drop, modify or lockimpactedElements
- list of table elements impactedlockGranularity
- lock granularity encoded in a single characterbehavior
- cascade or restrict (for DROP_TYPE)cm
- Context ManagerStandardException
public java.lang.String toString()
toString
in class DDLStatementNode
void printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth to indent the sub-nodespublic java.lang.String statementToString()
statementToString
in class StatementNode
public int getChangeType()
public void bindStatement() throws StandardException
bindStatement
in class StatementNode
StandardException
- Thrown on errorpublic boolean referencesSessionSchema() throws StandardException
referencesSessionSchema
in class QueryTreeNode
StandardException
- Thrown on errorpublic ConstantAction makeConstantAction() throws StandardException
makeConstantAction
in class QueryTreeNode
StandardException
- Thrown on failureprivate void prepConstantAction() throws StandardException
StandardException
- Thrown on failurepublic void genColumnInfo() throws StandardException
StandardException
void acceptChildren(Visitor v) throws StandardException
acceptChildren
in class DDLStatementNode
v
- the visitorStandardException
- on errorApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.