public class ModifyColumnNode extends ColumnDefinitionNode
Modifier and Type | Field and Description |
---|---|
(package private) int |
columnPosition |
(package private) UUID |
oldDefaultUUID |
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
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
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
Constructor and Description |
---|
ModifyColumnNode() |
Modifier and Type | Method and Description |
---|---|
(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)
|
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
getElementType, getName, hasCheckConstraint, hasConstraint, hasForeignKeyConstraint, hasPrimaryKeyConstraint, hasUniqueKeyConstraint, init, init
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generate, 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, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
int columnPosition
UUID oldDefaultUUID
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.public void useExistingCollation(TableDescriptor td) throws StandardException
td
- Table Descriptor that holds the column which is being alteredStandardException
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.Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.