public class SelectStatementRewriter extends ParseNodeRewriter
addElement, enterParseNode, getResolver, isTopLevel, leaveCompoundNode, newElementList, reset, rewrite, rewrite, visit, visit, visit, visit, visit, visit, visit, visit, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave, visitLeave
visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter, visitEnter
visit, visitEnter, visitLeave
public static SelectStatement removeFromWhereClause(SelectStatement statement, Set<ParseNode> removeNodes) throws SQLException
statement
- the select statement from which to filter.removeNodes
- expression nodes to filter out of WHERE clause.SQLException
public static SelectStatement moveFromHavingToWhereClause(SelectStatement statement, Set<ParseNode> moveNodes) throws SQLException
statement
- the select statement from which to move the nodes.moveNodes
- expression nodes to filter out of HAVING clause and add to WHERE clause.SQLException
public boolean visitEnter(AndParseNode node) throws SQLException
visitEnter
in interface ParseNodeVisitor<ParseNode>
visitEnter
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(AndParseNode node, List<ParseNode> nodes) throws SQLException
visitLeave
in interface ParseNodeVisitor<ParseNode>
visitLeave
in class ParseNodeRewriter
SQLException
public boolean visitEnter(OrParseNode node) throws SQLException
visitEnter
in interface ParseNodeVisitor<ParseNode>
visitEnter
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(OrParseNode node, List<ParseNode> nodes) throws SQLException
visitLeave
in interface ParseNodeVisitor<ParseNode>
visitLeave
in class ParseNodeRewriter
SQLException
public boolean visitEnter(ComparisonParseNode node) throws SQLException
visitEnter
in interface ParseNodeVisitor<ParseNode>
visitEnter
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(ComparisonParseNode node, List<ParseNode> c) throws SQLException
visitLeave
in interface ParseNodeVisitor<ParseNode>
visitLeave
in class ParseNodeRewriter
SQLException
public boolean visitEnter(LikeParseNode node) throws SQLException
visitEnter
in interface ParseNodeVisitor<ParseNode>
visitEnter
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(LikeParseNode node, List<ParseNode> c) throws SQLException
visitLeave
in interface ParseNodeVisitor<ParseNode>
visitLeave
in class ParseNodeRewriter
SQLException
public boolean visitEnter(InListParseNode node) throws SQLException
visitEnter
in interface ParseNodeVisitor<ParseNode>
visitEnter
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(InListParseNode node, List<ParseNode> c) throws SQLException
visitLeave
in interface ParseNodeVisitor<ParseNode>
visitLeave
in class ParseNodeRewriter
SQLException
public boolean visitEnter(InParseNode node) throws SQLException
visitEnter
in interface ParseNodeVisitor<ParseNode>
visitEnter
in class TraverseAllParseNodeVisitor<ParseNode>
SQLException
public ParseNode visitLeave(InParseNode node, List<ParseNode> c) throws SQLException
visitLeave
in interface ParseNodeVisitor<ParseNode>
visitLeave
in class ParseNodeRewriter
SQLException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.