mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor
This commit is contained in:
@@ -9,21 +9,25 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLTruncateStatement extends SQLStatementImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected List<SQLName> tableNames = new ArrayList<SQLName>(2);
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected List<SQLExprTableSource> tableSources = new ArrayList<SQLExprTableSource>(2);
|
||||
|
||||
public List<SQLName> getTableNames() {
|
||||
return tableNames;
|
||||
public List<SQLExprTableSource> getTableSources() {
|
||||
return tableSources;
|
||||
}
|
||||
|
||||
public void setTableNames(List<SQLName> tableNames) {
|
||||
this.tableNames = tableNames;
|
||||
public void setTableSources(List<SQLExprTableSource> tableSources) {
|
||||
this.tableSources = tableSources;
|
||||
}
|
||||
|
||||
public void addTableSource(SQLName name) {
|
||||
this.tableSources.add(new SQLExprTableSource(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, tableNames);
|
||||
acceptChild(visitor, tableSources);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user