mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
new feature : sql builder
This commit is contained in:
@@ -25,7 +25,6 @@ import com.alibaba.druid.sql.ast.SQLOrderBy;
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLCharExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLListExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLLiteralExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLNCharExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLQueryExpr;
|
||||
@@ -2666,24 +2665,8 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
accept(Token.SET);
|
||||
|
||||
for (;;) {
|
||||
SQLUpdateSetItem item = new SQLUpdateSetItem();
|
||||
|
||||
if (lexer.token() == (Token.LPAREN)) {
|
||||
lexer.nextToken();
|
||||
SQLListExpr list = new SQLListExpr();
|
||||
this.exprParser.exprList(list.getItems(), list);
|
||||
accept(Token.RPAREN);
|
||||
item.setColumn(list);
|
||||
} else {
|
||||
item.setColumn(this.exprParser.primary());
|
||||
}
|
||||
if (lexer.token() == Token.COLONEQ) {
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
accept(Token.EQ);
|
||||
}
|
||||
item.setValue(this.exprParser.expr());
|
||||
update.getItems().add(item);
|
||||
SQLUpdateSetItem item = this.exprParser.parseUpdateSetItem();
|
||||
update.addItem(item);
|
||||
|
||||
if (lexer.token() != Token.COMMA) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user