mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -3580,20 +3580,20 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
public boolean visit(SQLCommentStatement x) {
|
||||
SQLCommentStatement.Type type = x.getType();
|
||||
|
||||
SQLExpr on = x.getOn();
|
||||
SQLExprTableSource on = x.getOn();
|
||||
if (type == SQLCommentStatement.Type.TABLE) {
|
||||
print0(ucase ? "ALTER TABLE " : "alter table ");
|
||||
on.accept(this);
|
||||
print0(ucase ? " COMMENT = " : " comment = ");
|
||||
x.getComment().accept(this);
|
||||
} else {
|
||||
SQLPropertyExpr propertyExpr = (SQLPropertyExpr) on;
|
||||
SQLPropertyExpr propertyExpr = (SQLPropertyExpr) on.getExpr();
|
||||
|
||||
SQLExpr table = propertyExpr.getOwner();
|
||||
String column = propertyExpr.getName();
|
||||
|
||||
print0(ucase ? "ALTER TABLE " : "alter table ");
|
||||
table.accept(this);
|
||||
printTableSourceExpr(table);
|
||||
print0(ucase ? " MODIFY COLUMN " : " modify column ");
|
||||
print(column);
|
||||
print0(ucase ? " COMMENT " : " comment ");
|
||||
|
||||
Reference in New Issue
Block a user