mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sql parser
This commit is contained in:
-10
@@ -34,8 +34,6 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class MySqlCreateTableStatement extends SQLCreateTableStatement implements MySqlStatement {
|
||||
|
||||
private boolean ifNotExiists = false;
|
||||
|
||||
private Map<String, SQLObject> tableOptions = new LinkedHashMap<String, SQLObject>();
|
||||
|
||||
protected SQLSelect query;
|
||||
@@ -99,14 +97,6 @@ public class MySqlCreateTableStatement extends SQLCreateTableStatement implement
|
||||
this.query = query;
|
||||
}
|
||||
|
||||
public boolean isIfNotExiists() {
|
||||
return ifNotExiists;
|
||||
}
|
||||
|
||||
public void setIfNotExiists(boolean ifNotExiists) {
|
||||
this.ifNotExiists = ifNotExiists;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor instanceof MySqlASTVisitor) {
|
||||
|
||||
@@ -2375,6 +2375,11 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("REMOVE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
} else if (identifierEquals("ALGORITHM")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.EQ);
|
||||
stmt.getItems().add(new MySqlAlterTableOption("ALGORITHM", lexer.stringVal()));
|
||||
lexer.nextToken();
|
||||
} else if (identifierEquals(ENGINE)) {
|
||||
lexer.nextToken();
|
||||
accept(Token.EQ);
|
||||
|
||||
Reference in New Issue
Block a user