Class HasCorrelatedCRsVisitor
java.lang.Object
org.apache.derby.impl.sql.compile.HasCorrelatedCRsVisitor
- All Implemented Interfaces:
Visitor
Find out if we have an correlated column reference
anywhere below us. Stop traversal as soon as we find one.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
Indicate whether we found the node in question(package private) void
setHasCorrelatedCRs
(boolean value) Shortcut to set if hasCorrelatedCRsboolean
Method that is called to indicate whether we should skip all nodes below this node for traversal.boolean
Stop traversal if we found the target nodeIf we have found the target node, we are done.boolean
Method that is called to see ifvisit()
should be called on the children ofnode
before it is called onnode
itself.
-
Field Details
-
Constructor Details
-
HasCorrelatedCRsVisitor
HasCorrelatedCRsVisitor()Construct a visitor
-
-
Method Details
-
visit
If we have found the target node, we are done. -
stopTraversal
public boolean stopTraversal()Stop traversal if we found the target node- Specified by:
stopTraversal
in interfaceVisitor
- Returns:
- true/false
-
skipChildren
Description copied from interface:Visitor
Method that is called to indicate whether we should skip all nodes below this node for traversal. Useful if we want to effectively ignore/prune all branches under a particular node.Differs from stopTraversal() in that it only affects subtrees, rather than the entire traversal.
- Specified by:
skipChildren
in interfaceVisitor
- Parameters:
v
- the node to process- Returns:
- true/false
-
visitChildrenFirst
Description copied from interface:Visitor
Method that is called to see ifvisit()
should be called on the children ofnode
before it is called onnode
itself. If this method always returnstrue
, the visitor will walk the tree bottom-up. If it always returnsfalse
, the tree is visited top-down.- Specified by:
visitChildrenFirst
in interfaceVisitor
- Parameters:
v
- the top node of a sub-tree about to be visited- Returns:
true
ifnode
's children should be visited beforenode
,false
otherwise
-