Class HasCorrelatedCRsVisitor

java.lang.Object
org.apache.derby.impl.sql.compile.HasCorrelatedCRsVisitor
All Implemented Interfaces:
Visitor

class HasCorrelatedCRsVisitor extends Object implements Visitor
Find out if we have an correlated column reference anywhere below us. Stop traversal as soon as we find one.
  • Field Details

    • hasCorrelatedCRs

      private boolean hasCorrelatedCRs
  • Constructor Details

    • HasCorrelatedCRsVisitor

      HasCorrelatedCRsVisitor()
      Construct a visitor
  • Method Details

    • visit

      public Visitable visit(Visitable node)
      If we have found the target node, we are done.
      Specified by:
      visit in interface Visitor
      Parameters:
      node - the node to process
      Returns:
      me
    • stopTraversal

      public boolean stopTraversal()
      Stop traversal if we found the target node
      Specified by:
      stopTraversal in interface Visitor
      Returns:
      true/false
    • skipChildren

      public boolean skipChildren(Visitable v)
      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 interface Visitor
      Parameters:
      v - the node to process
      Returns:
      true/false
    • visitChildrenFirst

      public boolean visitChildrenFirst(Visitable v)
      Description copied from interface: Visitor
      Method that is called to see if visit() should be called on the children of node before it is called on node itself. If this method always returns true, the visitor will walk the tree bottom-up. If it always returns false, the tree is visited top-down.
      Specified by:
      visitChildrenFirst in interface Visitor
      Parameters:
      v - the top node of a sub-tree about to be visited
      Returns:
      true if node's children should be visited before node, false otherwise
    • hasCorrelatedCRs

      boolean hasCorrelatedCRs()
      Indicate whether we found the node in question
      Returns:
      true/false
    • setHasCorrelatedCRs

      void setHasCorrelatedCRs(boolean value)
      Shortcut to set if hasCorrelatedCRs
      Parameters:
      value - true/false