Examples of SQLName


Examples of com.alibaba.druid.sql.ast.SQLName

      stmt.setIgnore(true);
      lexer.nextToken();
    }
    accept(Token.INTO);
    accept(Token.TABLE);
    SQLName tableName = exprParser.name();
    stmt.setTableName(tableName);
    if (identifierEquals(CHARACTER)) {
      lexer.nextToken();
      accept(Token.SET);
      if (lexer.token() != Token.LITERAL_CHARS) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

    return stmt;
  }

  public WaspSqlPrepareStatement parsePrepare() {
    acceptIdentifier("PREPARE");
    SQLName name = exprParser.name();
    accept(Token.FROM);
    SQLExpr from = exprParser.expr();
    return new WaspSqlPrepareStatement(name, from);
  }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

  }

  public WaspSqlExecuteStatement parseExecute() {
    acceptIdentifier("EXECUTE");
    WaspSqlExecuteStatement stmt = new WaspSqlExecuteStatement();
    SQLName statementName = exprParser.name();
    stmt.setStatementName(statementName);
    if (identifierEquals("USING")) {
      lexer.nextToken();
      exprParser.exprList(stmt.getParameters());
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        lexer.nextToken();
      }
      if (lexer.token() == Token.INTO) {
        lexer.nextToken();
      }
      SQLName tableName = this.exprParser.name();
      insertStatement.setTableName(tableName);
      if (lexer.token() == Token.IDENTIFIER && !identifierEquals("VALUE")) {
        insertStatement.setAlias(lexer.stringVal());
        lexer.nextToken();
      }
    }
    if (lexer.token() == (Token.LPAREN)) {
      lexer.nextToken();
      if (lexer.token() == (Token.SELECT)) {
        SQLSelect select = this.exprParser.createSelectParser().select();
        select.setParent(insertStatement);
        insertStatement.setQuery(select);
      } else {
        this.exprParser.exprList(insertStatement.getColumns());
      }
      accept(Token.RPAREN);
    }
    if (lexer.token() == Token.VALUES || identifierEquals("VALUE")) {
      lexer.nextToken();
      for (;;) {
        accept(Token.LPAREN);
        SQLInsertStatement.ValuesClause values = new SQLInsertStatement.ValuesClause();
        this.exprParser.exprList(values.getValues());
        insertStatement.getValuesList().add(values);
        accept(Token.RPAREN);
        if (lexer.token() == Token.COMMA) {
          lexer.nextToken();
          continue;
        } else {
          break;
        }
      }
    } else if (lexer.token() == Token.SET) {
      lexer.nextToken();
      SQLInsertStatement.ValuesClause values = new SQLInsertStatement.ValuesClause();
      insertStatement.getValuesList().add(values);
      for (;;) {
        SQLName name = this.exprParser.name();
        insertStatement.getColumns().add(name);
        if (lexer.token() == Token.EQ) {
          lexer.nextToken();
        } else {
          accept(Token.COLONEQ);
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

      lexer.nextToken();
      accept(Token.EXISTS);
      stmt.setIfExists(true);
    }
    for (;;) {
      SQLName name = this.exprParser.name();
      stmt.addTableSource(name);
      if (lexer.token() == Token.COMMA) {
        lexer.nextToken();
        continue;
      }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

              + lexer.stringVal());
        } else if (lexer.token() == Token.DROP) {
          lexer.nextToken();
          if (lexer.token() == Token.INDEX) {
            lexer.nextToken();
            SQLName indexName = this.exprParser.name();
            SQLAlterTableDropIndex item = new SQLAlterTableDropIndex();
            item.setIndexName(indexName);
            stmt.getItems().add(item);
          } else {
            if (identifierEquals("COLUMN")) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

    private MySqlShowTablesStatement parseShowTabless() throws ParserException {
        MySqlShowTablesStatement stmt = new MySqlShowTablesStatement();

        if (lexer.token() == Token.FROM) {
            lexer.nextToken();
            SQLName database = exprParser.name();
            stmt.setDatabase(database);
        }

        if (lexer.token() == Token.LIKE) {
            lexer.nextToken();
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

    private MySqlShowColumnsStatement parseShowColumns() throws ParserException {
        MySqlShowColumnsStatement stmt = new MySqlShowColumnsStatement();

        if (lexer.token() == Token.FROM) {
            lexer.nextToken();
            SQLName table = exprParser.name();
            stmt.setTable(table);

            if (lexer.token() == Token.FROM) {
                lexer.nextToken();
                SQLName database = exprParser.name();
                stmt.setDatabase(database);
            }
        }

        if (lexer.token() == Token.LIKE) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        if (lexer.token() == Token.INTO) {
            lexer.nextToken();
        }

        SQLName tableName = exprParser.name();
        stmt.setTableName(tableName);

        if (lexer.token() == Token.VALUES || identifierEquals("VALUE")) {
            lexer.nextToken();
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        }

        accept(Token.INTO);
        accept(Token.TABLE);

        SQLName tableName = exprParser.name();
        stmt.setTableName(tableName);

        if (identifierEquals("CHARACTER")) {
            lexer.nextToken();
            accept(Token.SET);
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.