mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve sqlwall
This commit is contained in:
+10
@@ -44,6 +44,8 @@ public class MySqlCreateTableStatement extends SQLCreateTableStatement implement
|
||||
|
||||
private List<SQLCommentHint> hints = new ArrayList<SQLCommentHint>();
|
||||
|
||||
private List<SQLCommentHint> optionHints = new ArrayList<SQLCommentHint>();
|
||||
|
||||
private SQLExprTableSource like;
|
||||
|
||||
public MySqlCreateTableStatement(){
|
||||
@@ -156,4 +158,12 @@ public class MySqlCreateTableStatement extends SQLCreateTableStatement implement
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public List<SQLCommentHint> getOptionHints() {
|
||||
return optionHints;
|
||||
}
|
||||
|
||||
public void setOptionHints(List<SQLCommentHint> optionHints) {
|
||||
this.optionHints = optionHints;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -559,7 +559,10 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
SQLSelect query = new MySqlSelectParser(this.exprParser).select();
|
||||
stmt.setQuery(query);
|
||||
}
|
||||
|
||||
|
||||
while (lexer.token() == (Token.HINT)) {
|
||||
this.exprParser.parseHints(stmt.getOptionHints());
|
||||
}
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
@@ -497,6 +497,10 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
decrementIndent();
|
||||
}
|
||||
|
||||
for (SQLCommentHint hint : x.getOptionHints()) {
|
||||
print(' ');
|
||||
hint.accept(this);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user