refactor sql parser.

This commit is contained in:
wenshao
2017-09-18 19:57:42 +08:00
parent 8343ca08c4
commit 0062ea4919
15 changed files with 431 additions and 8 deletions
@@ -600,4 +600,23 @@ public class SQLServerOutputVisitor extends SQLASTOutputVisitor implements SQLSe
print0(ucase ? "GO" : "go");
return false;
}
@Override
public boolean visit(SQLCreateUserStatement x) {
print0(ucase ? "CREATE USER " : "create user ");
x.getUser().accept(this);
print0(ucase ? " WITH PASSWORD = " : " with password = ");
SQLExpr passoword = x.getPassword();
if (passoword instanceof SQLIdentifierExpr) {
print('\'');
passoword.accept(this);
print('\'');
} else {
passoword.accept(this);
}
return false;
}
}