| java.lang.Object org.apache.derby.impl.sql.compile.QueryTreeNode org.apache.derby.impl.sql.compile.TableElementNode org.apache.derby.impl.sql.compile.ColumnDefinitionNode
All known Subclasses: org.apache.derby.impl.sql.compile.ModifyColumnNode,
ColumnDefinitionNode | public class ColumnDefinitionNode extends TableElementNode (Code) | | A ColumnDefinitionNode represents a column definition in a DDL statement.
There will be a ColumnDefinitionNode for each column in a CREATE TABLE
statement, and for the column in an ALTER TABLE ADD COLUMN statement.
author: Jeff Lichtman |
Method Summary | |
void | bindAndValidateDefault(DataDictionary dd, TableDescriptor td) Check the validity of the default, if any, for this node. | public void | checkUserType(TableDescriptor td) Check the validity of a user type. | public boolean | defaultTypeIsValid(TypeId columnType, DataTypeDescriptor columnDesc, TypeId defaultType, ValueNode defaultNode, String defaultText) Check the validity of the default for this node
Parameters: columnType - TypeId of the target column. Parameters: columnDesc - Description of the type of thetarget column. Parameters: defaultType - TypeId of the default node. Parameters: defaultNode - Parsed ValueNode for the default value. Parameters: defaultText - Unparsed default value (as enteredby user). | int | getAction() Get the action associated with this node. | long | getAutoinc_create_or_modify_Start_Increment() | long | getAutoincrementIncrement() | long | getAutoincrementStart() | public String | getColumnName() Returns the unqualified name of the column being defined. | public DataTypeDescriptor | getDataTypeServices() Returns the data type services of the column being defined. | public DefaultInfo | getDefaultInfo() | public DefaultNode | getDefaultNode() Return the DefaultNode, if any, associated with this node. | public DataValueDescriptor | getDefaultValue() | UUID | getOldDefaultUUID() Get the UUID of the old column default. | public void | init(Object name, Object defaultNode, Object dataTypeServices, Object autoIncrementInfo) | public boolean | isAutoincrementColumn() | public String | toString() Convert this object to a String. | public void | validateAutoincrement(DataDictionary dd, TableDescriptor td, int tableType) Check the validity of the autoincrement values for this node.
The following errors are thrown by this routine.
1. | void | validateDefault(DataDictionary dd, TableDescriptor td) Check the validity of the default for this node. |
CREATE_AUTOINCREMENT | final public static int CREATE_AUTOINCREMENT(Code) | | |
MODIFY_AUTOINCREMENT_INC_VALUE | final public static int MODIFY_AUTOINCREMENT_INC_VALUE(Code) | | |
MODIFY_AUTOINCREMENT_RESTART_VALUE | final public static int MODIFY_AUTOINCREMENT_RESTART_VALUE(Code) | | |
autoinc_create_or_modify_Start_Increment | long autoinc_create_or_modify_Start_Increment(Code) | | |
autoincrementIncrement | long autoincrementIncrement(Code) | | |
autoincrementStart | long autoincrementStart(Code) | | |
autoincrementVerify | boolean autoincrementVerify(Code) | | |
isAutoincrement | boolean isAutoincrement(Code) | | |
checkUserType | public void checkUserType(TableDescriptor td) throws StandardException(Code) | | Check the validity of a user type. Checks whether this column
definition describes a user type that either doesn't exist or is
inaccessible, or that doesn't implement Serializable.
exception: StandardException - Thrown on error |
defaultTypeIsValid | public boolean defaultTypeIsValid(TypeId columnType, DataTypeDescriptor columnDesc, TypeId defaultType, ValueNode defaultNode, String defaultText) throws StandardException(Code) | | Check the validity of the default for this node
Parameters: columnType - TypeId of the target column. Parameters: columnDesc - Description of the type of thetarget column. Parameters: defaultType - TypeId of the default node. Parameters: defaultNode - Parsed ValueNode for the default value. Parameters: defaultText - Unparsed default value (as enteredby user). True if the defaultNode abides by the restrictionsimposed by DB2 on default constants; false otherwise. |
getAction | int getAction()(Code) | | Get the action associated with this node.
The action associated with this node. |
getAutoinc_create_or_modify_Start_Increment | long getAutoinc_create_or_modify_Start_Increment()(Code) | | Get the status of this autoincrement column
ColumnDefinitionNode.CREATE_AUTOINCREMENT - if this definition is for autoincrement column creatoinColumnDefinitionNode.MODIFY_AUTOINCREMENT_RESTART_VALUE -if this definition is for alter sutoincrement column to change the start value ColumnDefinitionNode.MODIFY_AUTOINCREMENT_INC_VALUE if this definition is for alter autoincrement column to change the increment value |
getAutoincrementIncrement | long getAutoincrementIncrement()(Code) | | Get the autoincrement increment value
Autoincrement increment value. |
getAutoincrementStart | long getAutoincrementStart()(Code) | | Get the autoincrement start value
Autoincrement start value. |
getColumnName | public String getColumnName()(Code) | | Returns the unqualified name of the column being defined.
the name of the column |
getDataTypeServices | public DataTypeDescriptor getDataTypeServices()(Code) | | Returns the data type services of the column being defined.
the data type services of the column |
getDefaultInfo | public DefaultInfo getDefaultInfo()(Code) | | Return the DefaultInfo containing the default information for this
column
The default info for the column |
getDefaultNode | public DefaultNode getDefaultNode()(Code) | | Return the DefaultNode, if any, associated with this node.
The DefaultNode, if any, associated with this node. |
getDefaultValue | public DataValueDescriptor getDefaultValue()(Code) | | Return the DataValueDescriptor containing the default value for this
column
The default value of the column |
getOldDefaultUUID | UUID getOldDefaultUUID()(Code) | | Get the UUID of the old column default.
The UUID of the old column default. |
init | public void init(Object name, Object defaultNode, Object dataTypeServices, Object autoIncrementInfo) throws StandardException(Code) | | Initializer for a ColumnDefinitionNode
Parameters: name - The name of the column Parameters: defaultNode - The default value of the column Parameters: dataTypeServices - A DataTypeServices telling the typeof the column Parameters: autoIncrementInfo - Info for autoincrement columns |
isAutoincrementColumn | public boolean isAutoincrementColumn()(Code) | | Is this an autoincrement column?
Whether or not this is an autoincrement column. |
toString | public String toString()(Code) | | Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
This object as a String |
validateAutoincrement | public void validateAutoincrement(DataDictionary dd, TableDescriptor td, int tableType) throws StandardException(Code) | | Check the validity of the autoincrement values for this node.
The following errors are thrown by this routine.
1. 42z21 Invalid Increment; i.e 0.
2. 42z22 Invalid Type; autoincrement created on a non-exact-numeric type
3. 42995 The requested function does not apply to global temporary tables
Parameters: dd - DataDictionary. Parameters: td - table descriptor. Parameters: tableType - base table or declared global temporary table. exception: StandardException - if autoincrement default is incorrect; i.eif increment is 0 or if initial or increment values are outof range for the datatype. |
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|