Package com.alibaba.druid.sql.ast.statement

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


    parseCreateIndexUsing(stmt);
    accept(Token.ON);
    stmt.setTable(this.exprParser.name());
    accept(Token.LPAREN);
    for (;;) {
      SQLSelectOrderByItem item = this.exprParser.parseSelectOrderByItem();
      stmt.getItems().add(item);
      if (lexer.token() == Token.COMMA) {
        lexer.nextToken();
        continue;
      }
View Full Code Here


            } else {
              item.setName(this.exprParser.name());
              accept(Token.LPAREN);
            }
            for (;;) {
              SQLSelectOrderByItem column = this.exprParser
                  .parseSelectOrderByItem();
              item.getItems().add(column);
              if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
              }
              break;
            }
            accept(Token.RPAREN);
            stmt.getItems().add(item);
          } else if (lexer.token() == Token.UNIQUE) {
            lexer.nextToken();
            if (lexer.token() == Token.INDEX) {
              lexer.nextToken();
            }
            WaspSqlAlterTableAddUnique item = new WaspSqlAlterTableAddUnique();
            if (lexer.token() == Token.LPAREN) {
              lexer.nextToken();
            } else {
              item.setName(this.exprParser.name());
              accept(Token.LPAREN);
            }
            for (;;) {
              SQLSelectOrderByItem column = this.exprParser
                  .parseSelectOrderByItem();
              item.getItems().add(column);
              if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
View Full Code Here

        return null;
    }

    public SQLSelectOrderByItem parseSelectOrderByItem() throws ParserException {
        SQLSelectOrderByItem item = new SQLSelectOrderByItem();

        item.setExpr(expr());

        if (lexer.token() == Token.ASC) {
            lexer.nextToken();
            item.setType(SQLOrderingSpecification.ASC);
        } else if (lexer.token() == Token.DESC) {
            lexer.nextToken();
            item.setType(SQLOrderingSpecification.DESC);
        }

        return item;
    }
View Full Code Here

        return null;
    }

    public SQLSelectOrderByItem parseSelectOrderByItem() throws ParserException {
        SQLSelectOrderByItem item = new SQLSelectOrderByItem();

        item.setExpr(expr());

        if (lexer.token() == Token.ASC) {
            lexer.nextToken();
            item.setType(SQLOrderingSpecification.ASC);
        } else if (lexer.token() == Token.DESC) {
            lexer.nextToken();
            item.setType(SQLOrderingSpecification.DESC);
        }

        return item;
    }
View Full Code Here

        return null;
    }

    public SQLSelectOrderByItem parseSelectOrderByItem() {
        SQLSelectOrderByItem item = new SQLSelectOrderByItem();

        item.setExpr(expr());

        if (lexer.token() == Token.ASC) {
            lexer.nextToken();
            item.setType(SQLOrderingSpecification.ASC);
        } else if (lexer.token() == Token.DESC) {
            lexer.nextToken();
            item.setType(SQLOrderingSpecification.DESC);
        }

        return item;
    }
View Full Code Here

        stmt.setTable(this.exprParser.name());

        accept(Token.LPAREN);

        for (;;) {
            SQLSelectOrderByItem item = this.exprParser.parseSelectOrderByItem();
            item.setParent(stmt);
            stmt.getItems().add(item);
            if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
            }
View Full Code Here

        stmt.setTable(this.exprParser.name());

        accept(Token.LPAREN);

        for (;;) {
            SQLSelectOrderByItem item = this.exprParser.parseSelectOrderByItem();
            item.setParent(stmt);
            stmt.getItems().add(item);
            if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
            }
View Full Code Here

            item.setName(this.exprParser.name());
            accept(Token.LPAREN);
        }

        for (;;) {
            SQLSelectOrderByItem column = this.exprParser.parseSelectOrderByItem();
            item.getItems().add(column);
            if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
            }
View Full Code Here

        stmt.setTable(this.exprParser.name());

        accept(Token.LPAREN);

        for (;;) {
            SQLSelectOrderByItem item = this.exprParser.parseSelectOrderByItem();
            item.setParent(stmt);
            stmt.getItems().add(item);
            if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
            }
View Full Code Here

            item.setName(this.exprParser.name());
            accept(Token.LPAREN);
        }

        for (;;) {
            SQLSelectOrderByItem column = this.exprParser.parseSelectOrderByItem();
            item.getItems().add(column);
            if (lexer.token() == Token.COMMA) {
                lexer.nextToken();
                continue;
            }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem

Copyright © 2018 www.massapicom. 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.