mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved schemastat
This commit is contained in:
@@ -24,14 +24,16 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLStatement {
|
||||
|
||||
protected boolean ifNotExiists = false;
|
||||
protected Type type;
|
||||
protected SQLExprTableSource tableSource;
|
||||
protected boolean ifNotExiists = false;
|
||||
protected Type type;
|
||||
protected SQLExprTableSource tableSource;
|
||||
|
||||
protected List<SQLTableElement> tableElementList = new ArrayList<SQLTableElement>();
|
||||
|
||||
// for postgresql
|
||||
private SQLExprTableSource inherits;
|
||||
private SQLExprTableSource inherits;
|
||||
|
||||
protected SQLSelect select;
|
||||
|
||||
public SQLCreateTableStatement(){
|
||||
|
||||
@@ -73,7 +75,7 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
|
||||
}
|
||||
|
||||
public static enum Type {
|
||||
GLOBAL_TEMPORARY, LOCAL_TEMPORARY
|
||||
GLOBAL_TEMPORARY, LOCAL_TEMPORARY
|
||||
}
|
||||
|
||||
public List<SQLTableElement> getTableElementList() {
|
||||
@@ -99,12 +101,21 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
|
||||
this.inherits = inherits;
|
||||
}
|
||||
|
||||
public SQLSelect getSelect() {
|
||||
return select;
|
||||
}
|
||||
|
||||
public void setSelect(SQLSelect select) {
|
||||
this.select = select;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
this.acceptChild(visitor, tableSource);
|
||||
this.acceptChild(visitor, tableElementList);
|
||||
this.acceptChild(visitor, inherits);
|
||||
this.acceptChild(visitor, select);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user