Visitable
ModifyColumnNode
public class ColumnDefinitionNode extends TableElementNode
Modifier and Type | Field | Description |
---|---|---|
(package private) long |
autoinc_create_or_modify_Start_Increment |
|
(package private) boolean |
autoincrementCycle |
|
(package private) long |
autoincrementIncrement |
|
(package private) long |
autoincrementStart |
|
(package private) boolean |
autoincrementVerify |
|
static int |
CREATE_AUTOINCREMENT |
|
(package private) DefaultInfoImpl |
defaultInfo |
|
(package private) DefaultNode |
defaultNode |
|
(package private) DataValueDescriptor |
defaultValue |
|
(package private) GenerationClauseNode |
generationClauseNode |
|
(package private) boolean |
isAutoincrement |
|
(package private) boolean |
keepCurrentDefault |
|
static int |
MODIFY_AUTOINCREMENT_ALWAYS_VS_DEFAULT |
|
static int |
MODIFY_AUTOINCREMENT_CYCLE_VALUE |
|
static int |
MODIFY_AUTOINCREMENT_INC_VALUE |
|
static int |
MODIFY_AUTOINCREMENT_RESTART_VALUE |
|
(package private) DataTypeDescriptor |
type |
The data type of this column.
|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
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
Constructor | Description |
---|---|
ColumnDefinitionNode(java.lang.String name,
ValueNode defaultNode,
DataTypeDescriptor dataTypeServices,
long[] autoIncrementInfo,
ContextManager cm) |
Constructor for a ColumnDefinitionNode
|
Modifier and Type | Method | Description |
---|---|---|
private void |
autoincrementCheckRange(long minValue,
long maxValue,
java.lang.String typeName) |
checks to see if autoincrementIncrement and autoincrementInitial
are within the bounds of the type whose min and max values are
passed into this routine.
|
(package private) void |
bindAndValidateDefault(DataDictionary dd,
TableDescriptor td) |
Check the validity of the default, if any, for this node.
|
(package private) void |
checkUserType(TableDescriptor td) |
Check the validity of a user type.
|
protected static DefaultInfoImpl |
createDefaultInfoOfAutoInc() |
|
(package private) boolean |
defaultTypeIsValid(TypeId columnType,
DataTypeDescriptor columnDesc,
TypeId defaultType,
ValueNode defaultNode,
java.lang.String defaultText) |
Check the validity of the default for this node
|
(package private) int |
getAction() |
Get the action associated with this node.
|
(package private) long |
getAutoinc_create_or_modify_Start_Increment() |
Get the status of this autoincrement column
|
(package private) boolean |
getAutoincrementCycle() |
Get the autoincrement cycle value
|
(package private) long |
getAutoincrementIncrement() |
Get the autoincrement increment value
|
(package private) long |
getAutoincrementStart() |
Get the autoincrement start value
|
(package private) java.lang.String |
getColumnName() |
Returns the unqualified name of the column being defined.
|
(package private) DefaultInfo |
getDefaultInfo() |
Return the DefaultInfo containing the default information for this
column
|
(package private) DefaultNode |
getDefaultNode() |
Return the DefaultNode, if any, associated with this node.
|
(package private) DataValueDescriptor |
getDefaultValue() |
Return the DataValueDescriptor containing the default value for this
column
|
(package private) GenerationClauseNode |
getGenerationClauseNode() |
Get the generation clause.
|
(package private) UUID |
getOldDefaultUUID() |
Get the UUID of the old column default.
|
(package private) DataTypeDescriptor |
getType() |
Returns the data type of the column being defined.
|
boolean |
hasGenerationClause() |
Return true if this column has a generation clause.
|
(package private) boolean |
isAutoincrementColumn() |
Is this an autoincrement column?
|
(package private) void |
printSubNodes(int depth) |
Prints the sub-nodes of this object.
|
(package private) void |
setCollationType(int collationType) |
Set the collation type, note derivation is always
implicit for any catalog item.
|
void |
setDefaultInfo(DefaultInfoImpl dii) |
Set the generation clause (Default) bound to this column.
|
(package private) void |
setNullability(boolean nullable) |
Set the nullability of the column definition node.
|
void |
setType(DataTypeDescriptor dts) |
Set the type of this column
|
java.lang.String |
toString() |
Convert this object to a String.
|
(package private) void |
validateAutoincrement(DataDictionary dd,
TableDescriptor td,
int tableType) |
Check the validity of the autoincrement values for this node.
|
(package private) void |
validateDefault(DataDictionary dd,
TableDescriptor td) |
Check the validity of the default for this node.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
getElementType, getName, hasCheckConstraint, hasConstraint, hasForeignKeyConstraint, hasPrimaryKeyConstraint, hasUniqueKeyConstraint
boolean isAutoincrement
DataTypeDescriptor type
DataValueDescriptor defaultValue
DefaultInfoImpl defaultInfo
DefaultNode defaultNode
boolean keepCurrentDefault
GenerationClauseNode generationClauseNode
long autoincrementIncrement
long autoincrementStart
boolean autoincrementCycle
long autoinc_create_or_modify_Start_Increment
boolean autoincrementVerify
public static final int CREATE_AUTOINCREMENT
public static final int MODIFY_AUTOINCREMENT_RESTART_VALUE
public static final int MODIFY_AUTOINCREMENT_INC_VALUE
public static final int MODIFY_AUTOINCREMENT_ALWAYS_VS_DEFAULT
public static final int MODIFY_AUTOINCREMENT_CYCLE_VALUE
ColumnDefinitionNode(java.lang.String name, ValueNode defaultNode, DataTypeDescriptor dataTypeServices, long[] autoIncrementInfo, ContextManager cm) throws StandardException
name
- The name of the columndefaultNode
- The default value of the columndataTypeServices
- A DataTypeServices telling the type
of the columnautoIncrementInfo
- Info for auto-increment columnscm
- The context managerStandardException
public java.lang.String toString()
toString
in class TableElementNode
java.lang.String getColumnName()
final DataTypeDescriptor getType()
public void setType(DataTypeDescriptor dts)
final void setNullability(boolean nullable)
void setCollationType(int collationType)
DataValueDescriptor getDefaultValue()
DefaultInfo getDefaultInfo()
public void setDefaultInfo(DefaultInfoImpl dii)
DefaultNode getDefaultNode()
public boolean hasGenerationClause()
GenerationClauseNode getGenerationClauseNode()
boolean isAutoincrementColumn()
long getAutoincrementStart()
long getAutoincrementIncrement()
boolean getAutoincrementCycle()
long getAutoinc_create_or_modify_Start_Increment()
void checkUserType(TableDescriptor td) throws StandardException
StandardException
- Thrown on errorUUID getOldDefaultUUID()
int getAction()
void bindAndValidateDefault(DataDictionary dd, TableDescriptor td) throws StandardException
dd
- The DataDictionary.td
- The TableDescriptor.StandardException
- Thrown on errorvoid validateAutoincrement(DataDictionary dd, TableDescriptor td, int tableType) throws StandardException
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.private void autoincrementCheckRange(long minValue, long maxValue, java.lang.String typeName) throws StandardException
StandardException
void validateDefault(DataDictionary dd, TableDescriptor td) throws StandardException
td
- The TableDescriptor.StandardException
- Thrown on errorprotected static DefaultInfoImpl createDefaultInfoOfAutoInc()
boolean defaultTypeIsValid(TypeId columnType, DataTypeDescriptor columnDesc, TypeId defaultType, ValueNode defaultNode, java.lang.String defaultText) throws StandardException
columnType
- TypeId of the target column.columnDesc
- Description of the type of the
target column.defaultType
- TypeId of the default node.defaultNode
- Parsed ValueNode for the default value.defaultText
- Unparsed default value (as entered
by user).StandardException
void printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth of this node in the treeApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.