mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor sql parser
This commit is contained in:
@@ -24,25 +24,37 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableAddIndex extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private SQLName name;
|
||||
private boolean unique;
|
||||
|
||||
private List<SQLSelectOrderByItem> items = new ArrayList<SQLSelectOrderByItem>();
|
||||
private SQLName name;
|
||||
|
||||
private String type;
|
||||
private final List<SQLSelectOrderByItem> items = new ArrayList<SQLSelectOrderByItem>();
|
||||
|
||||
private String type;
|
||||
|
||||
private String using;
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, getName());
|
||||
acceptChild(visitor, getItems());
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
public boolean isUnique() {
|
||||
return unique;
|
||||
}
|
||||
|
||||
public void setUnique(boolean unique) {
|
||||
this.unique = unique;
|
||||
}
|
||||
|
||||
public List<SQLSelectOrderByItem> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(List<SQLSelectOrderByItem> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
public SQLName getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -59,4 +71,12 @@ public class SQLAlterTableAddIndex extends SQLObjectImpl implements SQLAlterTabl
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getUsing() {
|
||||
return using;
|
||||
}
|
||||
|
||||
public void setUsing(String using) {
|
||||
this.using = using;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user