public class ParseNodeRewriter extends TraverseAllParseNodeVisitor<ParseNode>
Modifier and Type | Class and Description |
---|---|
protected static interface |
ParseNodeRewriter.CompoundNodeFactory |
Modifier and Type | Field and Description |
---|---|
protected static ParseNodeFactory |
NODE_FACTORY |
Modifier | Constructor and Description |
---|---|
protected |
ParseNodeRewriter() |
protected |
ParseNodeRewriter(ColumnResolver resolver) |
protected |
ParseNodeRewriter(ColumnResolver resolver,
int maxAliasCount) |
visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter
visit, visitEnter, visitLeave
protected static final ParseNodeFactory NODE_FACTORY
protected ParseNodeRewriter()
protected ParseNodeRewriter(ColumnResolver resolver)
protected ParseNodeRewriter(ColumnResolver resolver, int maxAliasCount)
public static ParseNode rewrite(ParseNode where, ParseNodeRewriter rewriter) throws SQLException
SQLException
public static SelectStatement rewrite(SelectStatement statement, ParseNodeRewriter rewriter) throws SQLException
statement
- the select statementSQLException
public boolean isTopLevel()
protected ColumnResolver getResolver()
protected void reset()
protected ParseNode leaveCompoundNode(CompoundParseNode node, List<ParseNode> children, ParseNodeRewriter.CompoundNodeFactory factory)
protected void enterParseNode(ParseNode node)
enterParseNode
in class TraverseAllParseNodeVisitor<ParseNode>
public ParseNode visitLeave(AndParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(OrParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(SubtractParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(AddParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(MultiplyParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(DivideParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(ModulusParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(FunctionParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(CaseParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(LikeParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(NotParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(ExistsParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(CastParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(InListParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(InParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(IsNullParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(ComparisonParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(BetweenParseNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visit(ColumnParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visit(LiteralParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visit(BindParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visit(WildcardParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visit(TableWildcardParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visit(FamilyWildcardParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visit(SubqueryParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public List<ParseNode> newElementList(int size)
newElementList
in interface ParseNodeVisitor<ParseNode>
newElementList
in class BaseParseNodeVisitor<ParseNode>
public ParseNode visitLeave(StringConcatParseNode node, List<ParseNode> l) throws SQLException
SQLException
public void addElement(List<ParseNode> l, ParseNode element)
addElement
in interface ParseNodeVisitor<ParseNode>
addElement
in class BaseParseNodeVisitor<ParseNode>
public ParseNode visitLeave(RowValueConstructorParseNode node, List<ParseNode> children) throws SQLException
SQLException
public ParseNode visit(SequenceValueParseNode node) throws SQLException
visit
in interface ParseNodeVisitor<ParseNode>
visit
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(ArrayConstructorNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(ArrayAnyComparisonNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(ArrayAllComparisonNode node, List<ParseNode> nodes) throws SQLException
SQLException
public ParseNode visitLeave(ArrayElemRefNode node, List<ParseNode> nodes) throws SQLException
SQLException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.