fix not support ALTER TABLE XXX ADD KEY xxx('xxx')

This commit is contained in:
bucketli
2015-04-09 14:36:45 +08:00
parent 541501cfb4
commit 1d66501ffe
5 changed files with 74 additions and 3 deletions
@@ -20,6 +20,7 @@ import java.util.List;
import com.alibaba.druid.sql.ast.SQLName;
import com.alibaba.druid.sql.ast.SQLObjectImpl;
import com.alibaba.druid.sql.parser.Token;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
public class SQLAlterTableAddIndex extends SQLObjectImpl implements SQLAlterTableItem {
@@ -33,6 +34,8 @@ public class SQLAlterTableAddIndex extends SQLObjectImpl implements SQLAlterTabl
private String type;
private String using;
private String keyOrIndex = Token.INDEX.name;
@Override
protected void accept0(SQLASTVisitor visitor) {
@@ -79,4 +82,11 @@ public class SQLAlterTableAddIndex extends SQLObjectImpl implements SQLAlterTabl
this.using = using;
}
public String getKeyOrIndex() {
return keyOrIndex;
}
public void setKeyOrIndex(String keyOrIndex) {
this.keyOrIndex = keyOrIndex;
}
}