class ModifyColumnNode extends ColumnDefinitionNode
Modifier and Type | Field and Description |
---|---|
(package private) int |
columnPosition |
(package private) static int |
K_DROP_COLUMN |
(package private) static int |
K_MODIFY_COLUMN_CONSTRAINT |
(package private) static int |
K_MODIFY_COLUMN_CONSTRAINT_NOT_NULL |
(package private) static int |
K_MODIFY_COLUMN_DEFAULT |
(package private) static int |
K_MODIFY_COLUMN_GENERATED_ALWAYS |
(package private) static int |
K_MODIFY_COLUMN_GENERATED_BY_DEFAULT |
(package private) static int |
K_MODIFY_COLUMN_TYPE |
(package private) int |
kind
This class is used to hold logically different objects for
space efficiency.
|
(package private) UUID |
oldDefaultUUID |
autoinc_create_or_modify_Start_Increment, autoincrementCycle, autoincrementIncrement, autoincrementStart, autoincrementVerify, CREATE_AUTOINCREMENT, defaultInfo, defaultNode, defaultValue, generationClauseNode, isAutoincrement, keepCurrentDefault, MODIFY_AUTOINCREMENT_ALWAYS_VS_DEFAULT, 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_MODIFY_CONSTRAINT, AT_UNKNOWN, elementType, name
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
ModifyColumnNode(int kind,
java.lang.String name,
ValueNode defaultNode,
DataTypeDescriptor dataTypeServices,
long[] autoIncrementInfo,
ContextManager cm) |
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.
|
(package private) void |
checkExistingConstraints(TableDescriptor td)
Check if the the column can be modified, and throw error if not.
|
(package private) void |
checkUserType(TableDescriptor td)
Check the validity of a user type.
|
(package private) int |
getAction()
Get the action associated with this node.
|
(package private) 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.
|
(package private) 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.
|
(package private) 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)
|
createDefaultInfoOfAutoInc, defaultTypeIsValid, getAutoinc_create_or_modify_Start_Increment, getAutoincrementCycle, getAutoincrementIncrement, getAutoincrementStart, getColumnName, getDefaultInfo, getDefaultNode, getDefaultValue, getGenerationClauseNode, getType, hasGenerationClause, isAutoincrementColumn, printSubNodes, setCollationType, setDefaultInfo, setNullability, setType, toString, validateDefault
getElementType, getName, hasCheckConstraint, hasConstraint, hasForeignKeyConstraint, hasPrimaryKeyConstraint, hasUniqueKeyConstraint
accept, acceptChildren, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
int columnPosition
UUID oldDefaultUUID
static final int K_MODIFY_COLUMN_TYPE
static final int K_MODIFY_COLUMN_DEFAULT
static final int K_MODIFY_COLUMN_CONSTRAINT
static final int K_MODIFY_COLUMN_CONSTRAINT_NOT_NULL
static final int K_DROP_COLUMN
static final int K_MODIFY_COLUMN_GENERATED_ALWAYS
static final int K_MODIFY_COLUMN_GENERATED_BY_DEFAULT
final int kind
kind
represents the logical object
type. See also ValueNode.isSameNodeKind(org.apache.derby.impl.sql.compile.ValueNode)
.ModifyColumnNode(int kind, java.lang.String name, ValueNode defaultNode, DataTypeDescriptor dataTypeServices, long[] autoIncrementInfo, ContextManager cm) throws StandardException
StandardException
UUID getOldDefaultUUID()
getOldDefaultUUID
in class ColumnDefinitionNode
int getColumnPosition()
void checkUserType(TableDescriptor td) throws StandardException
checkUserType
in class ColumnDefinitionNode
StandardException
- Thrown on errorvoid checkExistingConstraints(TableDescriptor td) throws StandardException
td
- The Table Descriptor on which the ALTER is being done.StandardException
- Thrown on Error.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
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.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.