public 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.
|
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_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
Constructor and Description |
---|
AlterTableNode() |
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() |
void |
init(java.lang.Object objectName)
Initializer for a TRUNCATE TABLE
|
void |
init(java.lang.Object objectName,
java.lang.Object sequential)
Initializer for a AlterTableNode for COMPRESS using temporary tables
rather than inplace compress
|
void |
init(java.lang.Object objectName,
java.lang.Object purge,
java.lang.Object defragment,
java.lang.Object truncateEndOfTable)
Initializer for a AlterTableNode for INPLACE COMPRESS
|
void |
init(java.lang.Object objectName,
java.lang.Object changeType,
java.lang.Object param1,
java.lang.Object param2,
java.lang.Object param3)
Initializer for a AlterTableNode.
|
ConstantAction |
makeConstantAction()
Create the Constant information that will drive the guts of Execution.
|
private void |
prepConstantAction()
Generate arguments to constant action.
|
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, bindName, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, initAndCheck, isAtomic, makeFromList
executeSchemaName, executeStatementName, generate, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement, updateIndexStatisticsFor
accept, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
public TableElementList tableElementList
public 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
public void init(java.lang.Object objectName) throws StandardException
init
in interface Node
init
in class DDLStatementNode
objectName
- The name of the table being truncatedStandardException
- Thrown on errorpublic void init(java.lang.Object objectName, java.lang.Object sequential) throws StandardException
init
in interface Node
init
in class QueryTreeNode
objectName
- The name of the table being alteredsequential
- Whether or not the COMPRESS is SEQUENTIALStandardException
- Thrown on errorpublic void init(java.lang.Object objectName, java.lang.Object purge, java.lang.Object defragment, java.lang.Object truncateEndOfTable) throws StandardException
init
in interface Node
init
in class QueryTreeNode
objectName
- The name of the table being alteredpurge
- PURGE during INPLACE COMPRESS?defragment
- DEFRAGMENT during INPLACE COMPRESS?truncateEndOfTable
- TRUNCATE END during INPLACE COMPRESS?StandardException
- Thrown on errorpublic void init(java.lang.Object objectName, java.lang.Object changeType, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3) throws StandardException
init
in interface Node
init
in class QueryTreeNode
objectName
- The name of the table being alteredchangeType
- ADD_TYPE or DROP_TYPE or UPDATE_STATISTICS or
or DROP_STATISTICSparam1
- For ADD_TYPE or DROP_TYPE, param1 gives the
elements impacted by ALTER TABLE.
For UPDATE_STATISTICS or or DROP_STATISTICS,
param1 is boolean - 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.param2
- For ADD_TYPE or DROP_TYPE, param2 gives the
new lock granularity, if any
For UPDATE_STATISTICS or DROP_STATISTICS,
param2 can be the name of the specific index
whose statistics will be dropped/updated. This
param is used only if param1 is set to falseparam3
- For DROP_TYPE, param3 can indicate if the drop
column is CASCADE or RESTRICTED. This param is
ignored for all the other changeType.StandardException
- Thrown on errorpublic java.lang.String toString()
toString
in class DDLStatementNode
public 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 QueryTreeNode
v
- the visitorStandardException
- on errorApache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.