java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.SpecialFunctionNode
- All Implemented Interfaces:
- org.apache.derby.iapi.sql.compile.Visitable
- public class SpecialFunctionNode
- extends ValueNode
SpecialFunctionNode handles system SQL functions.
A function value is either obtained by a method
call off the LanguageConnectionContext or Activation.
LanguageConnectionContext functions are state related to the connection.
Activation functions are those related to the statement execution.
Each SQL function takes no arguments and returns a SQLvalue.
Functions supported:
- USER
- CURRENT_USER
- SESSION_USER
- SYSTEM_USER
- CURRENT SCHEMA
- CURRENT ISOLATION
- IDENTITY_VAL_LOCAL
This node is used rather than some use of MethodCallNode for
runtime performance. MethodCallNode does not provide a fast access
to the current language connection or activatation, since it is geared
towards user defined routines.
| Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode |
bindExpression, categorize, changeToCNF, checkIsBoolean, checkReliability, checkReliability, checkTopPredicatesForEqualsConditions, constantExpression, copyFields, eliminateNots, genEqualsFalseTree, generate, generateFilter, genIsNullTree, genSQLJavaSQLTree, getClause, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isConstantExpression, isParameterNode, isRelationalOperator, optimizableEqualityNode, preprocess, putAndsOnTop, remapColumnReferencesToExpressions, selectivity, setClause, setDescriptor, setTransformed, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop |
| Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
accept, bind, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isSessionSchema, isSessionSchema, makeConstantAction, makeResultDescription, makeTableName, needsSavepoint, nodeHeader, optimize, parseQueryText, printLabel, printSubNodes, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, treePrint, treePrint, verifyClassExist |
sqlName
java.lang.String sqlName
- Name of SQL function
methodName
private java.lang.String methodName
- Java method name
methodType
private java.lang.String methodType
- Return type of Java method.
SpecialFunctionNode
public SpecialFunctionNode()
bindExpression
public ValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
throws org.apache.derby.iapi.error.StandardException
- Binding this special function means setting the result DataTypeServices.
In this case, the result type is based on the operation requested.
- Overrides:
bindExpression in class ValueNode
getOrderableVariantType
protected int getOrderableVariantType()
- Return the variant type for the underlying expression.
All supported special functions are QUERY_INVARIANT
- Overrides:
getOrderableVariantType in class ValueNode
generateExpression
public void generateExpression(ExpressionClassBuilder acb,
org.apache.derby.iapi.services.compiler.MethodBuilder mb)
throws org.apache.derby.iapi.error.StandardException
- Generate an expression that returns a DataValueDescriptor and
calls a method off the language connection or the activation.
- Overrides:
generateExpression in class ValueNode
toString
public java.lang.String toString()
- Description copied from class:
ValueNode
- Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
- Overrides:
toString in class ValueNode