improved schemastat

This commit is contained in:
高铁
2015-11-03 14:24:10 +08:00
parent 8cbaefe173
commit 2107d236c0
10 changed files with 173 additions and 38 deletions
@@ -37,8 +37,6 @@ public class MySqlCreateTableStatement extends SQLCreateTableStatement implement
private Map<String, SQLObject> tableOptions = new LinkedHashMap<String, SQLObject>();
protected SQLSelect query;
private SQLPartitioningClause partitioning;
private List<SQLCommentHint> hints = new ArrayList<SQLCommentHint>();
@@ -90,12 +88,14 @@ public class MySqlCreateTableStatement extends SQLCreateTableStatement implement
return tableOptions;
}
@Deprecated
public SQLSelect getQuery() {
return query;
return select;
}
@Deprecated
public void setQuery(SQLSelect query) {
this.query = query;
this.select = query;
}
@Override
@@ -113,7 +113,7 @@ public class MySqlCreateTableStatement extends SQLCreateTableStatement implement
this.acceptChild(visitor, getTableSource());
this.acceptChild(visitor, getTableElementList());
this.acceptChild(visitor, getLike());
this.acceptChild(visitor, getQuery());
this.acceptChild(visitor, getSelect());
}
visitor.endVisit(this);
}
@@ -581,7 +581,7 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
if (lexer.token() == (Token.SELECT)) {
SQLSelect query = new MySqlSelectParser(this.exprParser).select();
stmt.setQuery(query);
stmt.setSelect(query);
}
while (lexer.token() == (Token.HINT)) {
@@ -520,10 +520,10 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
x.getPartitioning().accept(this);
}
if (x.getQuery() != null) {
if (x.getSelect() != null) {
incrementIndent();
println();
x.getQuery().accept(this);
x.getSelect().accept(this);
decrementIndent();
}