org.apache.derby.impl.sql.compile
Class CreateAliasNode
java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.StatementNode
org.apache.derby.impl.sql.compile.DDLStatementNode
org.apache.derby.impl.sql.compile.CreateAliasNode
- All Implemented Interfaces:
- Visitable
public class CreateAliasNode
- extends DDLStatementNode
A CreateAliasNode represents a CREATE ALIAS statement.
Method Summary |
private boolean |
anyStringTypeDescriptor()
CreateAliasNode creates the RoutineAliasInfo for a user defined function
or procedure in it's init method, which is called by the parser. |
private void |
bindParameterTypes(RoutineAliasInfo aliasInfo)
Bind the class names for UDTs |
void |
bindStatement()
Bind this CreateAliasNode. |
void |
init(java.lang.Object aliasName,
java.lang.Object targetObject,
java.lang.Object methodName,
java.lang.Object aliasSpecificInfo,
java.lang.Object aliasType,
java.lang.Object delimitedIdentifier)
Initializer for a CreateAliasNode |
ConstantAction |
makeConstantAction()
Create the Constant information that will drive the guts of Execution. |
java.lang.String |
statementToString()
|
Methods inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode |
activationKind, bindName, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, init, initAndCheck, isAtomic, makeFromList, toString |
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
accept, acceptChildren, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PARAMETER_ARRAY
public static final int PARAMETER_ARRAY
- See Also:
- Constant Field Values
TABLE_NAME
public static final int TABLE_NAME
- See Also:
- Constant Field Values
DYNAMIC_RESULT_SET_COUNT
public static final int DYNAMIC_RESULT_SET_COUNT
- See Also:
- Constant Field Values
LANGUAGE
public static final int LANGUAGE
- See Also:
- Constant Field Values
EXTERNAL_NAME
public static final int EXTERNAL_NAME
- See Also:
- Constant Field Values
PARAMETER_STYLE
public static final int PARAMETER_STYLE
- See Also:
- Constant Field Values
SQL_CONTROL
public static final int SQL_CONTROL
- See Also:
- Constant Field Values
DETERMINISTIC
public static final int DETERMINISTIC
- See Also:
- Constant Field Values
NULL_ON_NULL_INPUT
public static final int NULL_ON_NULL_INPUT
- See Also:
- Constant Field Values
RETURN_TYPE
public static final int RETURN_TYPE
- See Also:
- Constant Field Values
ROUTINE_ELEMENT_COUNT
public static final int ROUTINE_ELEMENT_COUNT
- See Also:
- Constant Field Values
javaClassName
private java.lang.String javaClassName
methodName
private java.lang.String methodName
aliasType
private char aliasType
delimitedIdentifier
private boolean delimitedIdentifier
aliasInfo
private AliasInfo aliasInfo
CreateAliasNode
public CreateAliasNode()
init
public void init(java.lang.Object aliasName,
java.lang.Object targetObject,
java.lang.Object methodName,
java.lang.Object aliasSpecificInfo,
java.lang.Object aliasType,
java.lang.Object delimitedIdentifier)
throws StandardException
- Initializer for a CreateAliasNode
- Overrides:
init
in class QueryTreeNode
- Parameters:
aliasName
- The name of the aliastargetObject
- Target namemethodName
- The method namealiasType
- The alias typedelimitedIdentifier
- Whether or not to treat the class name
as a delimited identifier if trying to
resolve it as a class alias
- Throws:
StandardException
- Thrown on error
statementToString
public java.lang.String statementToString()
- Specified by:
statementToString
in class StatementNode
anyStringTypeDescriptor
private boolean anyStringTypeDescriptor()
- CreateAliasNode creates the RoutineAliasInfo for a user defined function
or procedure in it's init method, which is called by the parser. But at
that time, we do not have the SchemaDescriptor ready to determine the
collation type. Hence, at the bind time, when we do have the
SchemaDescriptor available, we should go back and fix the
RoutineAliasInfo to have correct collation for its character string
parameters and also fix its return type (for functions) so as to have
correct collation if it is returning character string type.
This method here checks if the RoutineAliasInfo has any character string
types associated with it. If not, then the RoutineAliasInfo that got
created at parsing time is just fine. But if not, then we should take
care of the collation type of it's character string types.
- Returns:
- true if it has a parameter or return type of character string
bindStatement
public void bindStatement()
throws StandardException
- Bind this CreateAliasNode. This means doing any static error
checking that can be done before actually creating the table.
For example, verifying that the column name list does not
contain any duplicate column names.
- Overrides:
bindStatement
in class StatementNode
- Throws:
StandardException
- Thrown on error
bindParameterTypes
private void bindParameterTypes(RoutineAliasInfo aliasInfo)
throws StandardException
- Bind the class names for UDTs
- Throws:
StandardException
makeConstantAction
public ConstantAction makeConstantAction()
throws StandardException
- Create the Constant information that will drive the guts of Execution.
- Overrides:
makeConstantAction
in class QueryTreeNode
- Throws:
StandardException
- Thrown on failure
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.