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
class CreateAliasNode extends DDLStatementNode
A CreateAliasNode represents a CREATE ALIAS statement.
-
-
Field Summary
Fields Modifier and Type Field Description static intAGG_ELEMENT_COUNTstatic intAGG_FOR_TYPEstatic intAGG_RETURN_TYPEprivate AliasInfoaliasInfoprivate charaliasTypestatic intDETERMINISTICstatic intDYNAMIC_RESULT_SET_COUNTstatic intEXTERNAL_NAMEprivate java.lang.StringjavaClassNamestatic intLANGUAGEprivate java.lang.StringmethodNameprivate static java.lang.String[]NON_RESERVED_AGGREGATESprivate static java.lang.String[]NON_RESERVED_FUNCTION_NAMESstatic intNULL_ON_NULL_INPUTstatic intPARAMETER_ARRAYstatic intPARAMETER_STYLEstatic intRETURN_TYPEstatic intROUTINE_ELEMENT_COUNTstatic intROUTINE_SECURITY_DEFINERstatic intSQL_CONTROLstatic intTABLE_NAMEstatic intVARARGS-
Fields inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode
ADD_TYPE, DROP_STATISTICS, DROP_TYPE, implicitCreateSchema, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPE, UPDATE_STATISTICS
-
Fields inherited from class org.apache.derby.impl.sql.compile.StatementNode
EMPTY_TD_LIST, NEED_CURSOR_ACTIVATION, NEED_DDL_ACTIVATION, NEED_NOTHING_ACTIVATION, NEED_PARAM_ACTIVATION, NEED_ROW_ACTIVATION
-
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
-
-
Constructor Summary
Constructors Constructor Description CreateAliasNode(TableName aliasName, java.lang.Object targetObject, java.lang.String methodName, java.lang.Object aliasSpecificInfo, char aliasType, ContextManager cm)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbindAggregate()Extra logic for binding user-defined aggregate definitionsprivate voidbindParameterTypes(RoutineAliasInfo aliasInfo)Bind the class names for UDTsvoidbindStatement()Bind this CreateAliasNode.private StandardExceptionillegalAggregate()Construct an exception flagging an illegal aggregate nameConstantActionmakeConstantAction()Create the Constant information that will drive the guts of Execution.(package private) java.lang.StringstatementToString()-
Methods inherited from class org.apache.derby.impl.sql.compile.DDLStatementNode
acceptChildren, activationKind, generate, getFullName, getObjectName, getRelativeName, getSchemaDescriptor, getSchemaDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, getTableDescriptor, initAndCheck, isAtomic, makeFromList, toString
-
Methods inherited from class org.apache.derby.impl.sql.compile.StatementNode
executeSchemaName, executeStatementName, generate, getCursorInfo, getSPSName, lockTableForCompilation, makeResultDescription, needsSavepoint, optimizeStatement, updateIndexStatisticsFor
-
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, 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, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
-
-
-
-
Field Detail
-
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_SECURITY_DEFINER
public static final int ROUTINE_SECURITY_DEFINER
- See Also:
- Constant Field Values
-
VARARGS
public static final int VARARGS
- See Also:
- Constant Field Values
-
ROUTINE_ELEMENT_COUNT
public static final int ROUTINE_ELEMENT_COUNT
- See Also:
- Constant Field Values
-
NON_RESERVED_FUNCTION_NAMES
private static final java.lang.String[] NON_RESERVED_FUNCTION_NAMES
-
NON_RESERVED_AGGREGATES
private static final java.lang.String[] NON_RESERVED_AGGREGATES
-
AGG_FOR_TYPE
public static final int AGG_FOR_TYPE
- See Also:
- Constant Field Values
-
AGG_RETURN_TYPE
public static final int AGG_RETURN_TYPE
- See Also:
- Constant Field Values
-
AGG_ELEMENT_COUNT
public static final int AGG_ELEMENT_COUNT
- See Also:
- Constant Field Values
-
javaClassName
private java.lang.String javaClassName
-
methodName
private java.lang.String methodName
-
aliasType
private char aliasType
-
aliasInfo
private AliasInfo aliasInfo
-
-
Constructor Detail
-
CreateAliasNode
CreateAliasNode(TableName aliasName, java.lang.Object targetObject, java.lang.String methodName, java.lang.Object aliasSpecificInfo, char aliasType, ContextManager cm) throws StandardException
Constructor- Parameters:
aliasName- The name of the aliastargetObject- Target name string or, if aliasType == ALIAS_TYPE_SYNONYM_AS_CHAR, a TableNamemethodName- The method namealiasSpecificInfo- An array of objects, see code for interpretationcm- The context manager- Throws:
StandardException- Thrown on error
-
-
Method Detail
-
statementToString
java.lang.String statementToString()
- Specified by:
statementToStringin classStatementNode
-
bindStatement
public void bindStatement() throws StandardExceptionBind 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:
bindStatementin classStatementNode- Throws:
StandardException- Thrown on error
-
bindAggregate
private void bindAggregate() throws StandardExceptionExtra logic for binding user-defined aggregate definitions- Throws:
StandardException
-
illegalAggregate
private StandardException illegalAggregate()
Construct an exception flagging an illegal aggregate name
-
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:
makeConstantActionin classQueryTreeNode- Throws:
StandardException- Thrown on failure
-
-