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:
@@ -27,9 +27,9 @@ public class SQLCommentStatement extends SQLStatementImpl {
|
||||
TABLE, COLUMN
|
||||
}
|
||||
|
||||
private SQLName on;
|
||||
private Type type;
|
||||
private SQLExpr comment;
|
||||
private SQLExprTableSource on;
|
||||
private Type type;
|
||||
private SQLExpr comment;
|
||||
|
||||
public SQLExpr getComment() {
|
||||
return comment;
|
||||
@@ -47,14 +47,21 @@ public class SQLCommentStatement extends SQLStatementImpl {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public SQLName getOn() {
|
||||
public SQLExprTableSource getOn() {
|
||||
return on;
|
||||
}
|
||||
|
||||
public void setOn(SQLName on) {
|
||||
public void setOn(SQLExprTableSource on) {
|
||||
if (on != null) {
|
||||
on.setParent(this);
|
||||
}
|
||||
this.on = on;
|
||||
}
|
||||
|
||||
public void setOn(SQLName on) {
|
||||
this.setOn(new SQLExprTableSource(on));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
|
||||
@@ -624,7 +624,7 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
|
||||
}
|
||||
|
||||
public boolean apply(SQLCommentStatement x) {
|
||||
SQLName on = x.getOn();
|
||||
SQLName on = x.getOn().getName();
|
||||
SQLExpr comment = x.getComment();
|
||||
if (comment == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user