| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| pack-priv boolean | internalCall
True if this is an internal call, just used to set up a generated method call. |
| pack-priv String | javaClassName
The name of the class containing the method. |
| protected Member | |
| pack-priv String | |
| pack-priv String[] | methodParameterTypes
The parameter types for the resolved method. |
| protected JavaValueNode[] | |
| private String[] | procedurePrimitiveArrayType
For resolution of procedure INOUT/OUT parameters to the primitive form, such as int[]. |
| pack-priv RoutineAliasInfo | routineInfo
For a procedure or function call |
| protected JSQLType[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | acceptChildren(Visitor
the visitor v)Overrides org. Accept the visitor for all visitable children of this node. |
| pack-priv void | |
| protected boolean | Returns: Whether or not all of the parameters to this node are QUERY_INVARIANT or CONSTANTReturn whether or not all of the parameters to this node are QUERY_INVARIANT or CONSTANT. |
| pack-priv final void | bindParameters(FromList
The FROM list for the query this
expression is in, for binding columns. fromList, SubqueryList The subquery list being built as we find SubqueryNodes subqueryList, List<AggregateNode> The aggregate list being built as we find AggregateNodes aggregates)Bind this expression. |
| pack-priv boolean | Returns: boolean Whether or not source.expression is a ColumnReference or a VirtualColumnNode.JBitSet with bit map of referenced FromTables referencedTabs, boolean Whether or not to consider method
calls, field references and conditional nodes
when building bit map simplePredsOnly)Implements abstract org. Categorize this predicate. |
| private void | generateAndCastOneParameter(ExpressionClassBuilder acb, MethodBuilder mb, int param, String parameterType)
Generate and cast one parameter, pushing the result onto the stack. |
| pack-priv void | generateOneParameter(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating acb, MethodBuilder the method the expression will go into mb, int Identifies which parameter to generate. 0 based. parameterNumber)Generate one parameter to the given method call. |
| public int | Returns: Count of arguments to the method.The ExpressionClassBuilder for the class we're generating acb, MethodBuilder the method the expression will go into mb)Generate the parameters to the given method call |
| private void | generateVarargs(ExpressionClassBuilder acb, MethodBuilder mb)
Generate the trailing routine arguments into a varargs array and push that array onto the stack. |
| pack-priv void | getCorrelationTables(JBitSet
The JBitSet of the tables that we are correlated with. correlationMap)Build a JBitSet of all of the tables that we are correlated with. |
| pack-priv DataTypeDescriptor | getDataType()
Overrides org. Override method in ancestor. |
| public int | |
| pack-priv TableName | |
| protected boolean[] | Returns: array of booleans denoting wheter or not a given method parameter is a ?.Build an array of booleans denoting whether or not a given method parameter is a ?. |
| public String | Returns: the name of the class that contains the method, null if not known. It may not be known until this node has been bound.
|
| pack-priv String | |
| pack-priv Class | Returns: the Classes of our parametersGet the resolved Classes of our parameters |
| pack-priv JavaValueNode[] | |
| protected String[] | |
| pack-priv static String | |
| pack-priv int | Returns: The variant type for the underlying expression.Overrides org. Return the variant type for the underlying expression. |
| public static String | |
| pack-priv String[] | |
| public Member | |
| protected int | getRoutineArgIdx(int invocationArgIdx)
Get the offset into the routine arguments corresponding to the index of the invocation parameter. |
| protected int | |
| public RoutineAliasInfo | |
| private String | getVarargTypeName(String arrayTypeName)
Turn an array type name into the corresponding vararg type name |
| private int | |
| public boolean | |
| public boolean | |
| private String[] | Returns: The valid array of types for resolution.Character offset of first paren offset, boolean Can ResultSet[] parameters be specified. hasDynamicResultSets)Parse the user supplied signature for a method and validate it, need to match the number of parameters passed in and match the valid types for the parameter. |
| pack-priv void | preprocess(int
Number of tables in the DML Statement numTables, FromList FromList from outer query block outerFromList, SubqueryList SubqueryList from outer query block outerSubqueryList, PredicateList PredicateList from outer query block outerPredicateList)Implements abstract org. Preprocess an expression tree. |
| pack-priv void | printSubNodes(int
The depth of this node in the tree depth)Overrides org. Prints the sub-nodes of this object. |
| pack-priv JavaValueNode | Returns: JavaValueNode The remapped expression tree.Implements abstract org. Remap all ColumnReferences in this tree to be clones of the underlying expression. |
| protected void | |
| pack-priv void | setNullParameterInfo(String[]
String[] with the java type names for the parameters
as declared by the method parmTypeNames)Set the appropriate type information for a null passed as a parameter. |
| protected boolean | |
| protected String | |
| pack-priv void | throwNoMethodFound(String
Type name for receiver receiverTypeName, String[] Type names for parameters as object types parmTypeNames, String[] Type names for parameters as primitive types primParmTypeNames)Build parameters for error message and throw the exception when there is no matching signature found. |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| actualMethodReturnType | back to summary |
|---|---|
| protected String actualMethodReturnType | |
| internalCall | back to summary |
|---|---|
| pack-priv boolean internalCall True if this is an internal call, just used to set up a generated method call. | |
| javaClassName | back to summary |
|---|---|
| pack-priv String javaClassName The name of the class containing the method. May not be known until bindExpression() has been called.
| |
| method | back to summary |
|---|---|
| protected Member method | |
| methodName | back to summary |
|---|---|
| pack-priv String methodName | |
| methodParameterTypes | back to summary |
|---|---|
| pack-priv String[] methodParameterTypes The parameter types for the resolved method. | |
| methodParms | back to summary |
|---|---|
| protected JavaValueNode[] methodParms | |
| procedurePrimitiveArrayType | back to summary |
|---|---|
| private String[] procedurePrimitiveArrayType For resolution of procedure INOUT/OUT parameters to the primitive form, such as int[]. May be null. | |
| routineInfo | back to summary |
|---|---|
| pack-priv RoutineAliasInfo routineInfo For a procedure or function call | |
| signature | back to summary |
|---|---|
| protected JSQLType[] signature | |
| MethodCallNode | back to summary |
|---|---|
| pack-priv MethodCallNode(String methodName, ContextManager cm) | |
| acceptChildren | back to summary |
|---|---|
| pack-priv void acceptChildren(Visitor v) throws StandardException Overrides org. Accept the visitor for all visitable children of this node.
| |
| addParms | back to summary |
|---|---|
| pack-priv void addParms(List<ValueNode> parameterList) throws StandardException Add the parameter list
| |
| areParametersQueryInvariant | back to summary |
|---|---|
| protected boolean areParametersQueryInvariant() throws StandardException Return whether or not all of the parameters to this node are QUERY_INVARIANT or CONSTANT. This is useful for VTIs - a VTI is a candidate for materialization if all of its parameters are QUERY_INVARIANT or CONSTANT
| |
| bindParameters | back to summary |
|---|---|
| pack-priv final void bindParameters(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException Bind this expression. This means binding the sub-expressions, as well as figuring out what the return type is for this expression.
| |
| categorize | back to summary |
|---|---|
| pack-priv boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException Implements abstract org. Categorize this predicate. Initially, this means building a bit map of the referenced tables for each predicate. If the source of this ColumnReference (at the next underlying level) is not a ColumnReference or a VirtualColumnNode then this predicate will not be pushed down. For example, in: select * from (select 1 from s) a (x) where x = 1 we will not push down x = 1. Note It would be easy to handle the case of a constant, but if the inner SELECT returns an arbitrary expression, then we would have to copy that tree into the pushed predicate, and that tree could contain subqueries and method calls. RESOLVE - revisit this issue once we have views.
| |
| generateAndCastOneParameter | back to summary |
|---|---|
| private void generateAndCastOneParameter(ExpressionClassBuilder acb, MethodBuilder mb, int param, String parameterType) throws StandardException Generate and cast one parameter, pushing the result onto the stack. | |
| generateOneParameter | back to summary |
|---|---|
| pack-priv void generateOneParameter(ExpressionClassBuilder acb, MethodBuilder mb, int parameterNumber) throws StandardException Generate one parameter to the given method call. This method is overriden by RepStaticMethodCallNode.
| |
| generateParameters | back to summary |
|---|---|
| public int generateParameters(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Generate the parameters to the given method call
| |
| generateVarargs | back to summary |
|---|---|
| private void generateVarargs(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Generate the trailing routine arguments into a varargs array and push that array onto the stack. | |
| getCorrelationTables | back to summary |
|---|---|
| pack-priv void getCorrelationTables(JBitSet correlationMap) throws StandardException Build a JBitSet of all of the tables that we are correlated with.
| |
| getDataType | back to summary |
|---|---|
| pack-priv DataTypeDescriptor getDataType() throws StandardException Overrides org. Override method in ancestor.
| |
| getFirstVarargIdx | back to summary |
|---|---|
| public int getFirstVarargIdx() Get the index of the first vararg if this is a varargs method | |
| getFullName | back to summary |
|---|---|
| pack-priv TableName getFullName() Get the schema-qualified name of the the routine. Is non-null only for StaticMethodCallNodes. | |
| getIsParam | back to summary |
|---|---|
| protected boolean[] getIsParam() Build an array of booleans denoting whether or not a given method parameter is a ?.
| |
| getJavaClassName | back to summary |
|---|---|
public String getJavaClassName()
| |
| getMethodName | back to summary |
|---|---|
| pack-priv String getMethodName() | |
| getMethodParameterClasses | back to summary |
|---|---|
| pack-priv Class Get the resolved Classes of our parameters
| |
| getMethodParms | back to summary |
|---|---|
| pack-priv JavaValueNode[] getMethodParms() Get the method parameters.
| |
| getObjectSignature | back to summary |
|---|---|
| protected String[] getObjectSignature() throws StandardException Build an array of names of the argument types. These types are biased toward Java objects. That is, if an argument is of SQLType, then we map it to the corresponding Java synonym class (e.g., SQLINT is mapped to 'java.lang.Integer').
| |
| getObjectTypeName | back to summary |
|---|---|
pack-priv static String getObjectTypeName(JSQLType jsqlType, TypeCompilerFactory tcf) throws StandardException
| |
| getOrderableVariantType | back to summary |
|---|---|
| pack-priv int getOrderableVariantType() throws StandardException Overrides org. Return the variant type for the underlying expression. The variant type can be: VARIANT - variant within a scan (non-static field access) SCAN_INVARIANT - invariant within a scan (column references from outer tables) QUERY_INVARIANT - invariant within the life of a query (constant expressions)
| |
| getParameterTypeName | back to summary |
|---|---|
| public static String getParameterTypeName(JavaValueNode param) throws StandardException | |
| getPrimitiveSignature | back to summary |
|---|---|
| pack-priv String[] getPrimitiveSignature(boolean castToPrimitiveAsNecessary) throws StandardException | |
| getResolvedMethod | back to summary |
|---|---|
public Member getResolvedMethod()
| |
| getRoutineArgIdx | back to summary |
|---|---|
| protected int getRoutineArgIdx(int invocationArgIdx) Get the offset into the routine arguments corresponding to the index of the invocation parameter. The two indexes may be different in the case of varargs methods. There may be more invocation args than declared routine args. For a varargs routine, all of the trailing invocation parameters correspond to the last argument declared by the CREATE FUNCTION/PROCEDURE statement. | |
| getRoutineArgIdx | back to summary |
|---|---|
| protected int getRoutineArgIdx(RoutineAliasInfo rai, int invocationArgIdx) | |
| getRoutineInfo | back to summary |
|---|---|
| public RoutineAliasInfo getRoutineInfo() Get the details on the invoked routines. | |
| getVarargTypeName | back to summary |
|---|---|
| private String getVarargTypeName(String arrayTypeName) Turn an array type name into the corresponding vararg type name | |
| getVariantTypeOfParams | back to summary |
|---|---|
| private int getVariantTypeOfParams() throws StandardException | |
| hasVarargs | back to summary |
|---|---|
| public boolean hasVarargs() Return true if the routine has varargs | |
| isVararg | back to summary |
|---|---|
| public boolean isVararg(int parameterNumber) Return true if the parameter is a vararg | |
| parseValidateSignature | back to summary |
|---|---|
| private String[] parseValidateSignature(String externalName, int offset, boolean hasDynamicResultSets) throws StandardException Parse the user supplied signature for a method and validate it, need to match the number of parameters passed in and match the valid types for the parameter.
| |
| preprocess | back to summary |
|---|---|
| pack-priv void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException Implements abstract org. Preprocess an expression tree. We do a number of transformations here (including subqueries, IN lists, LIKE and BETWEEN) plus subquery flattening. Note This is done before the outer ResultSetNode is preprocessed.
| |
| printSubNodes | back to summary |
|---|---|
| pack-priv void printSubNodes(int depth) Overrides org. Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.
| |
| remapColumnReferencesToExpressions | back to summary |
|---|---|
| pack-priv JavaValueNode remapColumnReferencesToExpressions() throws StandardException Implements abstract org. Remap all ColumnReferences in this tree to be clones of the underlying expression.
| |
| resolveMethodCall | back to summary |
|---|---|
| protected void resolveMethodCall(String javaClassName, boolean staticMethod) throws StandardException | |
| setNullParameterInfo | back to summary |
|---|---|
| pack-priv void setNullParameterInfo(String[] parmTypeNames) throws StandardException Set the appropriate type information for a null passed as a parameter. This method is called after method resolution, when a signature was successfully matched.
| |
| someParametersAreNull | back to summary |
|---|---|
| protected boolean someParametersAreNull() Return true if some parameters are null, false otherwise. | |
| stripOneArrayLevel | back to summary |
|---|---|
| protected String stripOneArrayLevel(String typeName) Strip the trailing [] from a type name | |
| throwNoMethodFound | back to summary |
|---|---|
| pack-priv void throwNoMethodFound(String receiverTypeName, String[] parmTypeNames, String[] primParmTypeNames) throws StandardException Build parameters for error message and throw the exception when there is no matching signature found.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing. | |