abstract class MethodCallNode extends JavaValueNode
QueryTreeNode.WordUtils
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
actualMethodReturnType |
(package private) boolean |
internalCall
True if this is an internal call, just used to set up a generated method call.
|
(package private) java.lang.String |
javaClassName
The name of the class containing the method.
|
protected java.lang.reflect.Member |
method |
(package private) java.lang.String |
methodName |
(package private) java.lang.String[] |
methodParameterTypes
The parameter types for the resolved method.
|
protected JavaValueNode[] |
methodParms |
(package private) RoutineAliasInfo |
routineInfo
For a procedure or function call
|
protected JSQLType[] |
signature |
forCallStatement, jsqlType
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, depth, isPrivilegeCollectionRequired
Constructor and Description |
---|
MethodCallNode() |
Modifier and Type | Method and Description |
---|---|
void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node.
|
void |
addOneParm(QueryTreeNode newParm)
Add the one single parameter
|
void |
addParms(java.util.List parameterList)
Add the parameter list
|
protected boolean |
areParametersQueryInvariant()
Return whether or not all of the parameters to this node are
QUERY_INVARIANT or CONSTANT.
|
(package private) void |
bindParameters(FromList fromList,
SubqueryList subqueryList,
java.util.List<AggregateNode> aggregateVector)
Bind this expression.
|
boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly)
Categorize this predicate.
|
void |
generateOneParameter(ExpressionClassBuilder acb,
MethodBuilder mb,
int parameterNumber)
Generate one parameter to the given method call.
|
int |
generateParameters(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate the parameters to the given method call
|
(package private) void |
getCorrelationTables(JBitSet correlationMap)
Build a JBitSet of all of the tables that we are
correlated with.
|
DataTypeDescriptor |
getDataType()
Override method in ancestor.
|
ColumnReference |
getHashableJoinColumnReference() |
protected boolean[] |
getIsParam()
Build an array of booleans denoting whether or not a given method
parameter is a ?.
|
java.lang.String |
getJavaClassName() |
java.lang.String |
getMethodName() |
java.lang.Class[] |
getMethodParameterClasses()
Get the resolved Classes of our parameters
|
JavaValueNode[] |
getMethodParms()
Get the method parameters.
|
protected java.lang.String[] |
getObjectSignature()
Build an array of names of the argument types.
|
(package private) static java.lang.String |
getObjectTypeName(JSQLType jsqlType,
TypeCompilerFactory tcf) |
protected int |
getOrderableVariantType()
Return the variant type for the underlying expression.
|
static java.lang.String |
getParameterTypeName(JavaValueNode param) |
(package private) java.lang.String[] |
getPrimitiveSignature(boolean castToPrimitiveAsNecessary) |
java.lang.reflect.Member |
getResolvedMethod() |
RoutineAliasInfo |
getRoutineInfo()
Get the details on the invoked routines.
|
void |
init(java.lang.Object methodName)
Initializer for a MethodCallNode
|
void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess an expression tree.
|
void |
printSubNodes(int depth)
Prints the sub-nodes of this object.
|
JavaValueNode |
remapColumnReferencesToExpressions()
Remap all ColumnReferences in this tree to be clones of the
underlying expression.
|
protected void |
resolveMethodCall(java.lang.String javaClassName,
boolean staticMethod) |
void |
setHashableJoinColumnReference(ColumnReference cr) |
void |
setNullParameterInfo(java.lang.String[] parmTypeNames)
Set the appropriate type information for a null passed as a parameter.
|
protected boolean |
someParametersAreNull()
Return true if some parameters are null, false otherwise.
|
(package private) void |
throwNoMethodFound(java.lang.String receiverTypeName,
java.lang.String[] parmTypeNames,
java.lang.String[] primParmTypeNames)
Build parameters for error message and throw the exception when there
is no matching signature found.
|
java.lang.String |
toString()
Convert this object to a String.
|
bindExpression, castToPrimitive, checkReliability, generate, generateExpression, generateReceiver, generateReceiver, getCollationType, getConstantValueAsObject, getJavaTypeName, getJSQLType, getPrimitiveTypeName, getReceiverExpression, isPrimitiveType, mapToTypeID, markForCallStatement, markReturnValueDiscarded, mustCastToPrimitive, returnValueDiscarded, returnValueToSQLDomain, setCollationType, setJavaTypeName, valueReturnedToSQLDomain
accept, accept, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, buildTree, checkReliability, checkReliability, childParentMap, collectReferencedColumns, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getConstantNode, getConstantNodeType, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getExtraInformation, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, markReferencedResultColumns, nodeHeader, orReliability, parseStatement, printExplainInformation, printExplainInformation, printExplainInformation, printExplainInformationForActivation, printLabel, printRuntimeInformation, projectionListPruning, referencesSessionSchema, resolveTableToSynonym, rsnChainMap, setBeginOffset, setContextManager, setDepth, setEndOffset, setNodeType, setRefActionInfo, spaceToLevel, toHTMLString, treePrint, treePrint, verifyClassExist
java.lang.String methodName
java.lang.String javaClassName
RoutineAliasInfo routineInfo
boolean internalCall
protected JSQLType[] signature
protected JavaValueNode[] methodParms
protected java.lang.reflect.Member method
protected java.lang.String actualMethodReturnType
java.lang.String[] methodParameterTypes
public void init(java.lang.Object methodName)
init
in interface Node
init
in class QueryTreeNode
methodName
- The name of the method to callpublic java.lang.String getMethodName()
public java.lang.String getJavaClassName()
public java.lang.reflect.Member getResolvedMethod()
public RoutineAliasInfo getRoutineInfo()
public void addParms(java.util.List parameterList) throws StandardException
parameterList
- A list of the parametersStandardException
- Thrown on errorpublic java.lang.Class[] getMethodParameterClasses()
void getCorrelationTables(JBitSet correlationMap) throws StandardException
correlationMap
- The JBitSet of the tables that we are correlated with.StandardException
public void printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth of this node in the treepublic java.lang.String toString()
toString
in class QueryTreeNode
final void bindParameters(FromList fromList, SubqueryList subqueryList, java.util.List<AggregateNode> aggregateVector) throws StandardException
fromList
- The FROM list for the query this
expression is in, for binding columns.subqueryList
- The subquery list being built as we find SubqueryNodesaggregateVector
- The aggregate vector being built as we find AggregateNodesStandardException
- Thrown on errorprotected boolean areParametersQueryInvariant() throws StandardException
StandardException
- thrown on errorvoid throwNoMethodFound(java.lang.String receiverTypeName, java.lang.String[] parmTypeNames, java.lang.String[] primParmTypeNames) throws StandardException
receiverTypeName
- Type name for receiverparmTypeNames
- Type names for parameters as object typesprimParmTypeNames
- Type names for parameters as primitive typesStandardException
- Thrown on errorpublic void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
preprocess
in class JavaValueNode
numTables
- Number of tables in the DML StatementouterFromList
- FromList from outer query blockouterSubqueryList
- SubqueryList from outer query blockouterPredicateList
- PredicateList from outer query blockStandardException
- Thrown on errorValueNode.preprocess(int, com.splicemachine.db.impl.sql.compile.FromList, com.splicemachine.db.impl.sql.compile.SubqueryList, com.splicemachine.db.impl.sql.compile.PredicateList)
public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException
categorize
in class JavaValueNode
referencedTabs
- JBitSet with bit map of referenced FromTablessimplePredsOnly
- Whether or not to consider method
calls, field references and conditional nodes
when building bit mapStandardException
- Thrown on errorValueNode.categorize(com.splicemachine.db.iapi.util.JBitSet, boolean)
public JavaValueNode remapColumnReferencesToExpressions() throws StandardException
remapColumnReferencesToExpressions
in class JavaValueNode
StandardException
- Thrown on errorValueNode.remapColumnReferencesToExpressions()
public int generateParameters(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class we're generatingmb
- the method the expression will go intoStandardException
- Thrown on errorpublic static java.lang.String getParameterTypeName(JavaValueNode param) throws StandardException
StandardException
public void generateOneParameter(ExpressionClassBuilder acb, MethodBuilder mb, int parameterNumber) throws StandardException
acb
- The ExpressionClassBuilder for the class we're generatingmb
- the method the expression will go intoparameterNumber
- Identifies which parameter to generate. 0 based.StandardException
- Thrown on errorpublic void setNullParameterInfo(java.lang.String[] parmTypeNames) throws StandardException
parmTypeNames
- String[] with the java type names for the parameters
as declared by the methodStandardException
- Thrown on errorprotected void resolveMethodCall(java.lang.String javaClassName, boolean staticMethod) throws StandardException
StandardException
protected boolean someParametersAreNull()
protected java.lang.String[] getObjectSignature() throws StandardException
StandardException
- Thrown on errorprotected boolean[] getIsParam()
static java.lang.String getObjectTypeName(JSQLType jsqlType, TypeCompilerFactory tcf) throws StandardException
StandardException
java.lang.String[] getPrimitiveSignature(boolean castToPrimitiveAsNecessary) throws StandardException
StandardException
protected int getOrderableVariantType() throws StandardException
getOrderableVariantType
in class JavaValueNode
StandardException
public DataTypeDescriptor getDataType() throws StandardException
getDataType
in class JavaValueNode
StandardException
public JavaValueNode[] getMethodParms()
public void acceptChildren(Visitor v) throws StandardException
acceptChildren
in class QueryTreeNode
v
- the visitorStandardException
public ColumnReference getHashableJoinColumnReference()
getHashableJoinColumnReference
in class QueryTreeNode
public void setHashableJoinColumnReference(ColumnReference cr)
setHashableJoinColumnReference
in class QueryTreeNode
public void addOneParm(QueryTreeNode newParm) throws StandardException
newParm
- The new parameter to be appended to methodParmsStandardException
- Thrown on error