Examples of SQLSelectStatement


Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

        this.exprParser);
    return parser.parseCrateTable(false);
  }

  public SQLSelectStatement parseSelect() {
    return new SQLSelectStatement(
        new WaspSqlSelectParser(this.exprParser).select());
  }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

              conf, fmetaServices);
          reader.addSchema(table.getTableName(), table);
          MetaEventOperation metaEventOperation = new FMetaEventOperation(
              reader);

          SQLSelectStatement sqlSelectStatement = (SQLSelectStatement) stmt;
          // this is SELECT clause
          SQLSelect select = sqlSelectStatement.getSelect();
          SQLSelectQuery sqlSelectQuery = select.getQuery();
          if (sqlSelectQuery instanceof SQLSelectQueryBlock) {
            SQLSelectQueryBlock sqlSelectQueryBlock = (SQLSelectQueryBlock) sqlSelectQuery;
            // Parse The WHERE clause
            SQLExpr where = sqlSelectQueryBlock.getWhere();
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

    public SQLCreateTableParser getSQLCreateTableParser() {
        return new SQLCreateTableParser(lexer);
    }

    public SQLSelectStatement parseSelect() throws ParserException {
        return new SQLSelectStatement(createSQLSelectParser().select());
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

        MySqlCreateTableParser parser = new MySqlCreateTableParser(lexer);
        return parser.parseCrateTable();
    }

    public SQLSelectStatement parseSelect() throws ParserException {
        return new SQLSelectStatement(new MySqlSelectParser(lexer).select());
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

    public SQLCreateTableParser getSQLCreateTableParser() {
        return new SQLCreateTableParser(lexer);
    }

    public SQLSelectStatement parseSelect() throws ParserException {
        return new SQLSelectStatement(createSQLSelectParser().select());
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

        MySqlCreateTableParser parser = new MySqlCreateTableParser(lexer);
        return parser.parseCrateTable();
    }

    public SQLSelectStatement parseSelect() throws ParserException {
        return new SQLSelectStatement(new MySqlSelectParser(lexer).select());
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

                lexer.nextToken();
                continue;
            }

            if (lexer.token() == (Token.SELECT)) {
                statementList.add(new SQLSelectStatement(new OracleSelectParser(this.lexer).select()));
                continue;
            }

            if (lexer.token() == (Token.UPDATE)) {
                statementList.add(new OracleUpdateParser(this.lexer).parseUpdate());
                continue;
            }

            if (lexer.token() == (Token.CREATE)) {
                lexer.nextToken();

                // if ((this.tokenList.lookup(1).equals(Token.ViewToken)) ||
                // (this.tokenList.lookup(3).equals(Token.ViewToken))
                // || (this.tokenList.lookup(4).equals(Token.ViewToken)) ||
                // (this.tokenList.lookup(5).equals(Token.ViewToken))) {
                // statementList.add(parseCreateView());
                // }
                //
                // if ((this.tokenList.lookup(1).equals(Token.TableToken)) ||
                // (this.tokenList.lookup(3).equals(Token.TableToken))) {
                // statementList.add(parseOracleCreateTable());
                // }

                throw new ParserException("TODO");
            }

            if (lexer.token() == Token.INSERT) {
                statementList.add(new OracleInsertParser(this.lexer).parseInsert());
                continue;
            }

            if (lexer.token() == (Token.DELETE)) {
                statementList.add(new OracleDeleteParser(this.lexer).parseDelete());
                continue;
            }

            if (lexer.token() == (Token.SLASH)) {
                lexer.nextToken();
                statementList.add(new OraclePLSQLCommitStatement());
                continue;
            }

            if (lexer.token() == Token.ALTER) {
                throw new ParserException("TODO");
            }
           
            if (lexer.token() == Token.WITH) {
                statementList.add(new SQLSelectStatement(new OracleSelectParser(this.lexer).select()));
                continue;
            }
           
            if (identifierEquals("CALL")) {
                statementList.add(this.parseCall());
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

        if (!(select.getParent() instanceof SQLSelectStatement)) {
            return false;
        }

        SQLSelectStatement stmt = (SQLSelectStatement) select.getParent();

        return stmt.getParent() == null;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

                        parent = parent.getParent();
                    }

                    boolean sameToTopSelectSchema = false;
                    if (parent instanceof SQLSelectStatement) {
                        SQLSelectStatement selectStmt = (SQLSelectStatement) parent;
                        SQLSelectQuery query = selectStmt.getSelect().getQuery();
                        if (query instanceof SQLSelectQueryBlock) {
                            SQLSelectQueryBlock queryBlock = (SQLSelectQueryBlock) query;
                            SQLTableSource from = queryBlock.getFrom();

                            while (from instanceof SQLJoinTableSource) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.statement.SQLSelectStatement

        SQLSelect select = (SQLSelect) queryBlock.getParent();
        if (!(select.getParent() instanceof SQLSelectStatement)) {
            return false;
        }

        SQLSelectStatement stmt = (SQLSelectStatement) select.getParent();
        return stmt.getParent() == null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.