Java Code Examples for net.sf.jsqlparser.statement.Statements

The following examples show how to use net.sf.jsqlparser.statement.Statements. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: NNAnalytics   Source File: SqlParser.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * The main method to parse the SQL statement into an NNA-understandable query.
 *
 * @param statement The SQL statement.
 * @throws JSQLParserException - if sql is unreadable
 */
public void parse(String statement) throws JSQLParserException {
  Statements statements = CCJSqlParserUtil.parseStatements(statement);
  INodeSqlStatementVisitor inodeVisitor = new INodeSqlStatementVisitor();
  statements.accept(inodeVisitor);
  set = inodeVisitor.set.toLowerCase();
  filters = String.join(",", inodeVisitor.filters);
  sum = inodeVisitor.sum;
  find = inodeVisitor.find;
  type = inodeVisitor.type;
  limit = inodeVisitor.limit;
  sortAscending = inodeVisitor.sortAscending;
  sortDescending = inodeVisitor.sortDescending;
  parentDirDepth = inodeVisitor.parentDirDepth;
  timeRange = inodeVisitor.timeRange;
}
 
Example 2
Source Project: compass   Source File: TableRenameVisitor.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void visit(Statements stmts)
{
    throw new UnsupportedOperationException("Not supported yet."); 
}
 
Example 3
Source Project: foxtrot   Source File: SqlElementVisitor.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void visit(Statements stmts) {
    //supported construct
}
 
Example 4
Source Project: DDF   Source File: TableVisitor.java    License: Apache License 2.0 2 votes vote down vote up
@Override
public void visit(Statements statements) throws Exception {

}