|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.sql.compile
Interface Visitor

- public interface Visitor
A visitor is an object that traverses the querytree and performs some action.
| Method Summary | |
boolean |
skipChildren(Visitable node)
Method that is called to indicate whether we should skip all nodes below this node for traversal. |
boolean |
stopTraversal()
Method that is called to see if query tree traversal should be stopped before visiting all nodes. |
Visitable |
visit(Visitable node)
This is the default visit operation on a QueryTreeNode. |
| Method Detail |
visit
public Visitable visit(Visitable node) throws org.apache.derby.iapi.error.StandardException
- This is the default visit operation on a
QueryTreeNode. It just returns the node. This
will typically suffice as the default visit
operation for most visitors unless the visitor
needs to count the number of nodes visited or
something like that.
Visitors will overload this method by implementing a version with a signature that matches a specific type of node. For example, if I want to do something special with aggregate nodes, then that Visitor will implement a visit(AggregateNode node) method which does the aggregate specific processing.
stopTraversal
public boolean stopTraversal()
- Method that is called to see
if query tree traversal should be
stopped before visiting all nodes.
Useful for short circuiting traversal
if we already know we are done.
skipChildren
public boolean skipChildren(Visitable node)
- 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.
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> sql >> [ compile overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC