org.eigenbase.util
Class Util.BacktrackVisitor<R>
java.lang.Object
org.eigenbase.sql.util.SqlBasicVisitor<R>
org.eigenbase.util.Util.BacktrackVisitor<R>
- All Implemented Interfaces:
- SqlVisitor<R>
- Enclosing class:
- Util
private static class Util.BacktrackVisitor<R>
- extends SqlBasicVisitor<R>
Field Summary |
protected int |
currentOffset
Only valid if currentParrent is a SqlCall or SqlNodeList Describes
the offset within the parent |
protected SqlNode |
currentParent
Used to keep track of the current SqlNode parent of a visiting node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentParent
protected SqlNode currentParent
- Used to keep track of the current SqlNode parent of a visiting node.
A value of null mean no parent. NOTE: In case of extending
SqlBasicVisitor, remember that parent value might not be set
depending on if and how visit(SqlCall) and visit(SqlNodeList) is
implemented.
currentOffset
protected int currentOffset
- Only valid if currentParrent is a SqlCall or SqlNodeList Describes
the offset within the parent
Util.BacktrackVisitor
private Util.BacktrackVisitor()
getCurrentParent
public SqlNode getCurrentParent()
getCurrentOffset
public Integer getCurrentOffset()
visit
public R visit(SqlNodeList nodeList)
- Description copied from interface:
SqlVisitor
- Visits a list of
SqlNode
objects.
- Specified by:
visit
in interface SqlVisitor<R>
- Overrides:
visit
in class SqlBasicVisitor<R>
- Parameters:
nodeList
- list of nodes- See Also:
SqlNodeList.accept(SqlVisitor)
visit
public R visit(SqlCall call)
- Description copied from interface:
SqlVisitor
- Visits a call to a
SqlOperator
.
- Specified by:
visit
in interface SqlVisitor<R>
- Overrides:
visit
in class SqlBasicVisitor<R>
- Parameters:
call
- Call- See Also:
SqlCall.accept(SqlVisitor)