|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.StatementNode
org.apache.derby.impl.sql.compile.DDLStatementNode
org.apache.derby.impl.sql.compile.AlterTableNode
public class AlterTableNode
A AlterTableNode represents a DDL statement that alters a table. It contains the name of the object to be created.
Field Summary | |
---|---|
TableDescriptor |
baseTable
|
int |
behavior
|
private int |
changeType
|
protected ColumnInfo[] |
colInfos
|
boolean |
compressTable
|
protected ConstraintConstantAction[] |
conActions
|
boolean |
defragment
|
private java.lang.String |
indexNameForUpdateStatistics
If statistic is getting updated for just one index, then indexNameForUpdateStatistics will tell the name of the specific index whose statistics need to be updated. |
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. |
Fields inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode |
---|
ADD_TYPE, DROP_TYPE, implicitCreateSchema, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPE |
Fields inherited from class org.apache.derby.impl.sql.compile.StatementNode |
---|
NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION |
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
Constructor Summary | |
---|---|
AlterTableNode()
|
Method Summary | |
---|---|
(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 updateStatisticsAll,
java.lang.Object indexName)
Initializer for a AlterTableNode for updating the statistics. |
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 tableElementList,
java.lang.Object lockGranularity,
java.lang.Object changeType,
java.lang.Object behavior)
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. |
Methods inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode |
---|
activationKind, bindName, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, initAndCheck, isAtomic, makeFromList |
Methods inherited from class org.apache.derby.impl.sql.compile.StatementNode |
---|
executeSchemaName, executeStatementName, generate, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public TableElementList tableElementList
public char lockGranularity
private boolean updateStatistics
private boolean updateStatisticsAll
private java.lang.String indexNameForUpdateStatistics
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
Constructor Detail |
---|
public AlterTableNode()
Method Detail |
---|
public void init(java.lang.Object objectName) throws StandardException
init
in class DDLStatementNode
objectName
- The name of the table being truncated
StandardException
- Thrown on errorpublic void init(java.lang.Object objectName, java.lang.Object updateStatisticsAll, java.lang.Object indexName) throws StandardException
init
in class QueryTreeNode
objectName
- The name of the table whose index(es) will have
their statistics updated.updateStatisticsAll
- If true then update the statistics of all
the indexes on the table. If false, then update
the statistics of only the index provided as
3rd parameter hereindexName
- Only used if updateStatisticsAll is set to
false.
StandardException
- Thrown on errorpublic void init(java.lang.Object objectName, java.lang.Object sequential) throws StandardException
init
in class QueryTreeNode
objectName
- The name of the table being alteredsequential
- Whether or not the COMPRESS is SEQUENTIAL
StandardException
- 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 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 tableElementList, java.lang.Object lockGranularity, java.lang.Object changeType, java.lang.Object behavior) throws StandardException
init
in class QueryTreeNode
objectName
- The name of the table being alteredtableElementList
- The alter table actionlockGranularity
- The new lock granularity, if anychangeType
- ADD_TYPE or DROP_TYPEbehavior
- If drop column is CASCADE or RESTRICTED
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 visitor
StandardException
- on error
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |