|
||||||||||
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
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 |
autoincrementIncrement, autoincrementStart, autoincrementVerify, dataTypeServices, defaultInfo, defaultNode, defaultValue, isAutoincrement |
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_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset |
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)
If the type of a column is being changed (for mulan, the length of the column is being increased then make sure that this does not violate any key constraints; the column being altered is 1. part of foreign key constraint ==> ERROR. |
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 |
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, getAutoincrementIncrement, getAutoincrementStart, getColumnName, getDataTypeServices, getDefaultInfo, getDefaultNode, getDefaultValue, init, isAutoincrementColumn, 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 ColumnDefinitionNode
public int getColumnPosition()
public void checkUserType(TableDescriptor td) throws StandardException
checkUserType
in class ColumnDefinitionNode
StandardException
- Thrown on errorpublic void checkExistingConstraints(TableDescriptor td) throws StandardException
td
- The Table Descriptor on which the ALTER is being done.
StandardException
- Thrown on Error.int getAction()
getAction
in class ColumnDefinitionNode
void bindAndValidateDefault(DataDictionary dd, TableDescriptor td) throws StandardException
bindAndValidateDefault
in class ColumnDefinitionNode
dd
- The DataDictionary.td
- The TableDescriptor.
StandardException
- Thrown on errorprivate 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 ColumnDefinitionNode
dd
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |