improved sql parser for sqlserver, support for xml clause

This commit is contained in:
wenshao
2014-11-16 09:56:36 +08:00
parent 95b6133d5a
commit 6983fa6d1f
16 changed files with 529 additions and 25 deletions
@@ -1808,16 +1808,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Printab
print("GRANT ");
printAndAccept(x.getPrivileges(), ", ");
if (x.getOn() != null) {
print(" ON ");
if (x.getObjectType() != null) {
print(x.getObjectType().name());
print(' ');
}
x.getOn().accept(this);
}
printGrantOn(x);
if (x.getTo() != null) {
print(" TO ");
@@ -1877,6 +1868,19 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Printab
return false;
}
protected void printGrantOn(SQLGrantStatement x) {
if (x.getOn() != null) {
print(" ON ");
if (x.getObjectType() != null) {
print(x.getObjectType().name());
print(' ');
}
x.getOn().accept(this);
}
}
@Override
public boolean visit(SQLRevokeStatement x) {
print("ROVOKE ");