| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| private boolean | |
| private boolean | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private ValueNode | |
| private boolean | |
| private boolean | |
| 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 | |
| private boolean | |
| pack-priv boolean | havingSubquery
is this subquery part of a having clause. |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv ValueNode | |
| 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 static final int | |
| private ValueNode | |
| private OrderByList | |
| pack-priv BinaryComparisonOperatorNode | |
| private int | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv ResultSetNode | |
| private int | |
| pack-priv int | |
| private BooleanConstantNode | |
| pack-priv boolean | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | SubqueryNode(ResultSetNode
The ResultSetNode for the subquery resultSet, int The type of the subquery subqueryType, ValueNode The left operand, if any, of the subquery leftOperand, OrderByList ORDER BY list orderCols, ValueNode OFFSET n ROWS offset, ValueNode FETCH FIRST n ROWS ONLY fetchFirst, boolean True if the offset/fetchFirst clauses come from JDBC limit/offset escape syntax hasJDBClimitClause, ContextManager Context Manager cm)Constructor. |
| 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 ValueNode | Returns: The new top of the expression tree.The FROM list for the query this
expression is in, for binding columns.
fromList, SubqueryList Note fromList will be null if the subquery appears in a VALUES clause. 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: Whether or not the NOT IN or ALL subquery can be flattened.Can NOT IN, ALL be falttened to NOT EXISTS join? |
| 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 ValueNode | Returns: The modified expressionWhether or not we are under a top level AndNode. underTopAndNode)Overrides org. Finish putting an expression into conjunctive normal form. |
| private void | changeToCorrespondingExpressionType()
Convert this IN/ANY subquery, which is known to return at most 1 row, to an equivalent expression subquery. |
| pack-priv ValueNode | Returns: The modified expressionWhether or not we are under a NotNode. underNotNode)Overrides org. Eliminate NotNodes in the current query block. |
| private 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, boolean Is it a flattening into a NOT EXISTS join flattenableNotExists)Flatten this subquery into the outer query block as an exists join. |
| private 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)Flatten this subquery into the outer query block. |
| pack-priv void | generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class being built expressionBuilder, MethodBuilder The method the expression will go into mbex)Overrides org. Do code generation for this subquery. |
| private LocalField | |
| public ValueNode | Returns: fetch first if specified, else null.Get FETCH FIRST (used to construct FROM_SUBQUERY only), cf. FromSubquery, for which this node is transient. |
| private BinaryComparisonOperatorNode | getNewJoinCondition(ValueNode
The left operand for the new condition. leftOperand, ValueNode The right operand for the new condition. rightOperand)Build a new join condition between the leftOperand and the rightOperand. |
| public ValueNode | Returns: offset if specified, else null.Get OFFSET (used to construct FROM_SUBQUERY only), cf. FromSubquery, for which this node is transient. |
| protected int | Returns: The variant type for the underlying expression.Overrides org. Return the variant type for the underlying expression. |
| public OrderByList | Returns: order by list if specified, else null.Get ORDER BY list (used to construct FROM_SUBQUERY only), cf. FromSubquery, for which this node is transient. |
| pack-priv int | Returns: int The ResultSet # for the point of attachmentGet the ResultSet # for the point of attachment for this SubqueryNode. |
| pack-priv boolean | Returns: Whether or not this SubqueryNode has already been preprocessed.Get whether or not this SubqueryNode has already been preprocessed. |
| pack-priv ResultSetNode | Returns: ResultSetNode underlying this SubqueryNode.Return the resultSet for this SubqueryNode. |
| private ValueNode | Returns: the right operandGet the node that will be the right operand in the join condition if this ALL/ANY/SOME/(NOT) IN subquery is flattened to a join. |
| pack-priv int | |
| private BooleanConstantNode | |
| pack-priv boolean | Returns: boolean Whether or not this subquery is immediately under a top level AndNode.Return whether or not this subquery is immediately under a top level AndNode. |
| pack-priv boolean | Returns: whether the subquery has correlated column references.Check to see if this subquery has correlated column references. |
| public boolean | Returns: true if the JDBC limit/offset semantics (rather than the SQL Standard OFFSET/FETCH NEXT) semantics applyReturn true if the offset/fetchFirst clauses were added by JDBC LIMIT escape syntax. |
| private boolean | |
| private boolean | |
| 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. |
| private boolean | |
| public boolean | Returns: true if it is part of a having clause, otherwise falseIs this subquery part of a having clause? |
| private boolean | |
| private boolean | |
| public boolean | |
| private boolean | |
| private boolean | |
| pack-priv boolean | Returns: true if this subquery is a WHERE EXISTS | ANY | IN subquery with a subquery in its own WHERE clauseCheck whether this is a WHERE EXISTS | ANY | IN subquery with a subquery in its own WHERE clause. |
| pack-priv boolean | Returns: true if it is part of a where clause, otherwise falseIs this subquery part of a whereclause? |
| pack-priv void | |
| pack-priv void | optimize(DataDictionary
The DataDictionary to use for optimization dataDictionary, double The optimizer's estimate of the number of
times this subquery will be executed. outerRows)Optimize this SubqueryNode. |
| 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. |
| private UnaryComparisonOperatorNode | Returns: UnaryComparisonOperatorNode An IS [NOT] NULL above the transformed subquery.Number of tables in DML Statement numTables)Transform: expression QuantifiedOperator (select x from ...) into (select true from .. |
| public boolean | referencesSessionSchema()
Overrides org. Return true if the node references SESSION schema tables (temporary or permanent) |
| pack-priv ValueNode | Returns: ValueNode The remapped expression tree.Overrides org. Remap all ColumnReferences in this tree to be clones of the underlying expression. |
| private boolean | Returns: true if it is OK to flatten this query to a NOT EXISTS
join, false otherwisethe number of tables in this statement numTables, FromBaseTable the only fbt)FromBaseTable in this subqueryCheck if the right operand is on a form that makes it possible to flatten this query to a NOT EXISTS join. |
| private void | |
| public void | |
| pack-priv void | setParentComparisonOperator(BinaryComparisonOperatorNode
The parent BCON. parent)Set the parent BCON. |
| pack-priv void | setPointOfAttachment(int
The point of attachment of this subquery. pointOfAttachment)Set the point of attachment of this subquery. |
| pack-priv void | |
| pack-priv void | |
| private FromBaseTable | Returns: theFromBaseTable if the from list from the subquery
contains a single entry which is a FBT or a PRN/FBT, or null
if the subquery does not contain a single FBTThe from list from the subquery fromList)Does the from list from the subquery contain a single entry which is a FBT or a PRN/FBT. |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |