substr().
Java operators are not represented here: the JSQL language allows Java
methods to be called from expressions, but not Java operators.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv final int | kind
This class is used to hold logically different objects for space efficiency. |
| pack-priv String | |
| pack-priv ValueNode | |
| pack-priv String | |
| pack-priv String | |
| pack-priv ValueNode | |
| pack-priv String | |
| pack-priv String | |
| pack-priv String | |
| pack-priv ValueNode | |
| pack-priv static final String[][] | |
| pack-priv static final String[] | |
| pack-priv static final String[] | |
| pack-priv static final String[] | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv | TernaryOperatorNode(ValueNode
The receiver (e.g., string being operated on in
receiver, ValueNode substr())The left operand of the node leftOperand, ValueNode The right operand of the node rightOperand, int The kind of the operand kind, ContextManager The context manager cm)Constructor for a TernaryOperatorNode |
| pack-priv | TernaryOperatorNode(ValueNode
The receiver (e.g., string being operated on in
receiver, ValueNode substr())The left operand of the node leftOperand, ValueNode The right operand of the node rightOperand, int The kind of the operand kind, int The trim type trimType, ContextManager The context manager cm)Constructor for a TernaryOperatorNode |
| 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. |
| private void | |
| pack-priv ValueNode | Returns: The new top of the expression tree.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)Overrides org. Bind this expression. |
| private boolean | Returns: true if arg is a ? param with no type associated with itCheck if arg is a ? param and if yes, then set it's type to
jdbcType if arg doesn't have a type associated with it. arg, int Associate this type with arg if arg is a ? param with no
type associated with it jdbcType)This method gets called for non-character string types and hence no need to set any collation info. |
| protected void | |
| protected ValueNode | |
| 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)Overrides org. Categorize this predicate. |
| pack-priv boolean | constantExpression(PredicateList whereClause)
Overrides org. Return whether or not this expression tree represents a constant value. |
| private void | |
| pack-priv void | generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating acb, MethodBuilder The method the expression will go into mb)Overrides org. Do code generation for this ternary operator. |
| pack-priv ValueNode | |
| pack-priv ValueNode | |
| pack-priv ValueNode | |
| private DataTypeDescriptor | |
| pack-priv boolean | Returns: Whether or not this expression tree represents a constant expression.Overrides org. Return whether or not this expression tree represents a constant expression. |
| pack-priv boolean | isEquivalent(ValueNode
the node to compare this ValueNode against. o)Implements abstract org. Tests if this node is equivalent to the specified ValueNode. |
| pack-priv boolean | isSameNodeKind(ValueNode
The other value node whose kind we want to compare with. o)Overrides org. Some node classes represent several logical node types (to reduce footprint), which we call kinds. |
| pack-priv ValueNode | Returns: The new top of the expression tree.Bind locate operator The variable receiver is the string which will searched The variable leftOperand is the search character that will looked in the receiver variable. |
| pack-priv ValueNode | Returns: The modified expressionNumber 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)Overrides 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 ValueNode | Returns: ValueNode The remapped expression tree.Overrides org. Remap all ColumnReferences in this tree to be clones of the underlying expression. |
| pack-priv void | setLeftOperand(ValueNode
The new leftOperand newLeftOperand)Set the leftOperand to the specified ValueNode |
| private void | |
| pack-priv void | setRightOperand(ValueNode
The new rightOperand newRightOperand)Set the rightOperand to the specified ValueNode |
| pack-priv ValueNode | |
| private void | |
| private ValueNode | |
| private ValueNode | |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| private ValueNode |
| K_LIKE | back to summary |
|---|---|
| pack-priv static final int K_LIKE | |
| K_LOCATE | back to summary |
|---|---|
| pack-priv static final int K_LOCATE | |
| K_SUBSTRING | back to summary |
|---|---|
| pack-priv static final int K_SUBSTRING | |
| K_TIMESTAMPADD | back to summary |
|---|---|
| pack-priv static final int K_TIMESTAMPADD | |
| K_TIMESTAMPDIFF | back to summary |
|---|---|
| pack-priv static final int K_TIMESTAMPDIFF | |
| K_TRIM | back to summary |
|---|---|
| pack-priv static final int K_TRIM | |
| kind | back to summary |
|---|---|
| pack-priv final int kind This class is used to hold logically different objects for
space efficiency. | |
| leftInterfaceType | back to summary |
|---|---|
| pack-priv String leftInterfaceType | |
| leftOperand | back to summary |
|---|---|
| pack-priv ValueNode leftOperand | |
| methodName | back to summary |
|---|---|
| pack-priv String methodName | |
| operator | back to summary |
|---|---|
| pack-priv String operator | |
| receiver | back to summary |
|---|---|
| pack-priv ValueNode receiver | |
| receiverInterfaceType | back to summary |
|---|---|
| pack-priv String receiverInterfaceType | |
| resultInterfaceType | back to summary |
|---|---|
| pack-priv String resultInterfaceType | |
| rightInterfaceType | back to summary |
|---|---|
| pack-priv String rightInterfaceType | |
| rightOperand | back to summary |
|---|---|
| pack-priv ValueNode rightOperand | |
| TernaryArgType | back to summary |
|---|---|
| pack-priv static final String[][] TernaryArgType | |
| TernaryMethodNames | back to summary |
|---|---|
| pack-priv static final String[] TernaryMethodNames | |
| TernaryOperators | back to summary |
|---|---|
| pack-priv static final String[] TernaryOperators | |
| TernaryResultType | back to summary |
|---|---|
| pack-priv static final String[] TernaryResultType | |
| trimType | back to summary |
|---|---|
| pack-priv int trimType | |
| TernaryOperatorNode | back to summary |
|---|---|
| pack-priv TernaryOperatorNode(ValueNode receiver, ValueNode leftOperand, ValueNode rightOperand, int kind, ContextManager cm) Constructor for a TernaryOperatorNode
| |
| TernaryOperatorNode | back to summary |
|---|---|
| pack-priv TernaryOperatorNode(ValueNode receiver, ValueNode leftOperand, ValueNode rightOperand, int kind, int trimType, ContextManager cm) Constructor for a TernaryOperatorNode
| |
| acceptChildren | back to summary |
|---|---|
| pack-priv void acceptChildren(Visitor v) throws StandardException Overrides org. Accept the visitor for all visitable children of this node.
| |
| bindDateTimeArg | back to summary |
|---|---|
| private void bindDateTimeArg(ValueNode arg, int argNumber) throws StandardException | |
| bindExpression | back to summary |
|---|---|
| pack-priv ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException Overrides org. Bind this expression. This means binding the sub-expressions, as well as figuring out what the return type is for this expression.
| |
| bindParameter | back to summary |
|---|---|
| private boolean bindParameter(ValueNode arg, int jdbcType) throws StandardException This method gets called for non-character string types and hence no need to set any collation info. Collation applies only to character string types.
| |
| bindToBuiltIn | back to summary |
|---|---|
| protected void bindToBuiltIn() throws StandardException | |
| castArgToString | back to summary |
|---|---|
| protected ValueNode castArgToString(ValueNode vn) throws StandardException | |
| categorize | back to summary |
|---|---|
| pack-priv boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException Overrides 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.
| |
| constantExpression | back to summary |
|---|---|
| pack-priv boolean constantExpression(PredicateList whereClause) Overrides org. Doc from org. Return whether or not this expression tree represents a constant value. In this case, "constant" means that it will always evaluate to the same thing, even if it includes columns. A column is constant if it is compared to a constant expression.
| |
| constructorMinion | back to summary |
|---|---|
| private void constructorMinion(ValueNode receiver, ValueNode leftOperand, ValueNode rightOperand, int trimType) | |
| generateExpression | back to summary |
|---|---|
| pack-priv void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Overrides org. Do code generation for this ternary operator.
| |
| getLeftOperand | back to summary |
|---|---|
| pack-priv ValueNode getLeftOperand() Get the leftOperand
| |
| getReceiver | back to summary |
|---|---|
| pack-priv ValueNode getReceiver() | |
| getRightOperand | back to summary |
|---|---|
| pack-priv ValueNode getRightOperand() Get the rightOperand
| |
| getVarcharDescriptor | back to summary |
|---|---|
| private DataTypeDescriptor getVarcharDescriptor() | |
| isConstantExpression | back to summary |
|---|---|
| pack-priv boolean isConstantExpression() Overrides org. Return whether or not this expression tree represents a constant expression.
| |
| isEquivalent | back to summary |
|---|---|
| pack-priv boolean isEquivalent(ValueNode o) throws StandardException Implements abstract org. Doc from org. Tests if this node is equivalent to the specified ValueNode. Two ValueNodes are considered equivalent if they will evaluate to the same value during query execution. This method provides basic expression matching facility for the derived class of ValueNode and it is used by the language layer to compare the node structural form of the two expressions for equivalence at bind phase. Note that it is not comparing the actual row values at runtime to produce a result; hence, when comparing SQL NULLs, they are considered to be equivalent and not unknown. One usage case of this method in this context is to compare the select column expression against the group by expression to check if they are equivalent. e.g.: SELECT c1+c2 FROM t1 GROUP BY c1+c2 In general, node equivalence is determined by the derived class of ValueNode. But they generally abide to the rules below:
| |
| isSameNodeKind | back to summary |
|---|---|
| pack-priv boolean isSameNodeKind(ValueNode o) Overrides org. Doc from org. Some node classes represent several logical node types (to reduce
footprint), which we call kinds.
This means that implementations of
| |
| locateBind | back to summary |
|---|---|
| pack-priv ValueNode locateBind() throws StandardException Bind locate operator The variable receiver is the string which will searched The variable leftOperand is the search character that will looked in the receiver variable.
| |
| preprocess | back to summary |
|---|---|
| pack-priv ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException Overrides 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 ValueNode remapColumnReferencesToExpressions() throws StandardException Overrides org. Remap all ColumnReferences in this tree to be clones of the underlying expression.
| |
| setLeftOperand | back to summary |
|---|---|
| pack-priv void setLeftOperand(ValueNode newLeftOperand) Set the leftOperand to the specified ValueNode
| |
| setResultType | back to summary |
|---|---|
| private void setResultType(TypeId resultType) throws StandardException | |
| setRightOperand | back to summary |
|---|---|
| pack-priv void setRightOperand(ValueNode newRightOperand) Set the rightOperand to the specified ValueNode
| |
| substrBind | back to summary |
|---|---|
| pack-priv ValueNode substrBind() throws StandardException Bind substr expression.
| |
| throwBadType | back to summary |
|---|---|
| private void throwBadType(String funcName, String type) throws StandardException | |
| timestampAddBind | back to summary |
|---|---|
| private ValueNode timestampAddBind() throws StandardException Bind TIMESTAMPADD expression.
| |
| timestampDiffBind | back to summary |
|---|---|
| private ValueNode timestampDiffBind() throws StandardException Bind TIMESTAMPDIFF expression.
| |
| 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. | |
| trimBind | back to summary |
|---|---|
| private ValueNode trimBind() throws StandardException Bind trim expression. The variable receiver is the string that needs to be trimmed. The variable leftOperand is the character that needs to be trimmed from receiver.
| |