org.eigenbase.sql.advise
Class SqlSimpleParser.Query

java.lang.Object
  extended by org.eigenbase.sql.advise.SqlSimpleParser.Token
      extended by org.eigenbase.sql.advise.SqlSimpleParser.Query
Enclosing class:
SqlSimpleParser

static class SqlSimpleParser.Query
extends SqlSimpleParser.Token


Field Summary
private  List<SqlSimpleParser.Token> tokenList
           
 
Constructor Summary
SqlSimpleParser.Query(List<SqlSimpleParser.Token> tokenList)
           
 
Method Summary
private  boolean contains(String hintToken)
           
private  List<SqlSimpleParser.Token> findClause(SqlSimpleParser.TokenType keyword)
           
private  void purgeFromExcept(String hintToken)
           
private  void purgeGroupByHaving()
           
private  void purgeOrderBy()
           
private  void purgeSelect()
           
private  void purgeSelectExprsKeepAliases()
           
private  void purgeSelectListExcept(String hintToken)
           
private  void purgeWhere()
           
 SqlSimpleParser.Query simplify(String hintToken)
           
static void simplifyList(List<SqlSimpleParser.Token> list, String hintToken)
           
 void unparse(StringBuilder buf)
           
 
Methods inherited from class org.eigenbase.sql.advise.SqlSimpleParser.Token
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tokenList

private final List<SqlSimpleParser.Token> tokenList
Constructor Detail

SqlSimpleParser.Query

public SqlSimpleParser.Query(List<SqlSimpleParser.Token> tokenList)
Method Detail

unparse

public void unparse(StringBuilder buf)
Overrides:
unparse in class SqlSimpleParser.Token

simplifyList

public static void simplifyList(List<SqlSimpleParser.Token> list,
                                String hintToken)

simplify

public SqlSimpleParser.Query simplify(String hintToken)

purgeSelectListExcept

private void purgeSelectListExcept(String hintToken)

purgeSelect

private void purgeSelect()

purgeSelectExprsKeepAliases

private void purgeSelectExprsKeepAliases()

purgeFromExcept

private void purgeFromExcept(String hintToken)

purgeWhere

private void purgeWhere()

purgeGroupByHaving

private void purgeGroupByHaving()

purgeOrderBy

private void purgeOrderBy()

findClause

private List<SqlSimpleParser.Token> findClause(SqlSimpleParser.TokenType keyword)

contains

private boolean contains(String hintToken)