|
|||||||||
| 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.TableElementNode
org.apache.derby.impl.sql.compile.ColumnDefinitionNode
org.apache.derby.impl.sql.compile.ModifyColumnNode
public class ModifyColumnNode
A ModifyColumnNode represents a modify column in an ALTER TABLE statement.
| Field Summary | |
|---|---|
(package private) int |
columnPosition
|
(package private) UUID |
oldDefaultUUID
|
| Fields inherited from class org.apache.derby.impl.sql.compile.ColumnDefinitionNode |
|---|
autoinc_create_or_modify_Start_Increment, autoincrementIncrement, autoincrementStart, autoincrementVerify, CREATE_AUTOINCREMENT, defaultInfo, defaultNode, defaultValue, generationClauseNode, isAutoincrement, keepCurrentDefault, MODIFY_AUTOINCREMENT_INC_VALUE, MODIFY_AUTOINCREMENT_RESTART_VALUE, type |
| Fields inherited from class org.apache.derby.impl.sql.compile.TableElementNode |
|---|
AT_ADD_CHECK_CONSTRAINT, AT_ADD_FOREIGN_KEY_CONSTRAINT, AT_ADD_PRIMARY_KEY_CONSTRAINT, AT_ADD_UNIQUE_CONSTRAINT, AT_DROP_COLUMN, AT_DROP_CONSTRAINT, AT_MODIFY_COLUMN, AT_UNKNOWN, elementType, name |
| 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 | |
|---|---|
ModifyColumnNode()
|
|
| Method Summary | |
|---|---|
(package private) void |
bindAndValidateDefault(DataDictionary dd,
TableDescriptor td)
Check the validity of the default, if any, for this node. |
void |
checkExistingConstraints(TableDescriptor td)
Check if the the column can be modified, and throw error if not. |
void |
checkUserType(TableDescriptor td)
Check the validity of a user type. |
(package private) int |
getAction()
Get the action associated with this node. |
int |
getColumnPosition()
Get the column position for the column. |
private ColumnDescriptor |
getLocalColumnDescriptor(java.lang.String name,
TableDescriptor td)
|
(package private) UUID |
getOldDefaultUUID()
Get the UUID of the old column default. |
void |
useExistingCollation(TableDescriptor td)
If the column being modified is of character string type, then it should get its collation from the corresponding column in the TableDescriptor. |
void |
validateAutoincrement(DataDictionary dd,
TableDescriptor td,
int tableType)
check the validity of autoincrement values in the case that we are modifying an existing column (includes checking if autoincrement is set when making a column nullable) |
| Methods inherited from class org.apache.derby.impl.sql.compile.ColumnDefinitionNode |
|---|
defaultTypeIsValid, getAutoinc_create_or_modify_Start_Increment, getAutoincrementIncrement, getAutoincrementStart, getColumnName, getDefaultInfo, getDefaultNode, getDefaultValue, getGenerationClauseNode, getType, hasGenerationClause, init, isAutoincrementColumn, printSubNodes, setCollationType, setDefaultInfo, setNullability, setType, toString, validateDefault |
| Methods inherited from class org.apache.derby.impl.sql.compile.TableElementNode |
|---|
getElementType, getName, hasCheckConstraint, hasConstraint, hasForeignKeyConstraint, hasPrimaryKeyConstraint, hasUniqueKeyConstraint, init, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int columnPosition
UUID oldDefaultUUID
| Constructor Detail |
|---|
public ModifyColumnNode()
| Method Detail |
|---|
UUID getOldDefaultUUID()
getOldDefaultUUID in class ColumnDefinitionNodepublic int getColumnPosition()
public void checkUserType(TableDescriptor td)
throws StandardException
checkUserType in class ColumnDefinitionNodeStandardException - Thrown on error
public void checkExistingConstraints(TableDescriptor td)
throws StandardException
td - The Table Descriptor on which the ALTER is being done.
StandardException - Thrown on Error.
public void useExistingCollation(TableDescriptor td)
throws StandardException
td - Table Descriptor that holds the column which is being altered
StandardExceptionint getAction()
getAction in class ColumnDefinitionNode
void bindAndValidateDefault(DataDictionary dd,
TableDescriptor td)
throws StandardException
bindAndValidateDefault in class ColumnDefinitionNodedd - The DataDictionary.td - The TableDescriptor.
StandardException - Thrown on error
private ColumnDescriptor getLocalColumnDescriptor(java.lang.String name,
TableDescriptor td)
throws StandardException
StandardException
public void validateAutoincrement(DataDictionary dd,
TableDescriptor td,
int tableType)
throws StandardException
validateAutoincrement in class ColumnDefinitionNodedd - DataDictionary.td - table descriptor.tableType - base table or declared global temporary table.
StandardException - if autoincrement default is incorrect; i.e
if increment is 0 or if initial or increment values are out
of range for the datatype.
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||