improved mysql parser, support more create view syntax.

This commit is contained in:
wenshao
2017-02-11 19:20:39 +08:00
parent 427c16d955
commit 1f3c5467eb
5 changed files with 194 additions and 51 deletions
@@ -2053,6 +2053,31 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
if (x.isOrReplace()) {
print0(ucase ? "OR REPLACE " : "or replace ");
}
incrementIndent();
String algorithm = x.getAlgorithm();
if (algorithm != null && algorithm.length() > 0) {
print0(ucase ? "ALGORITHM = " : "algorithm = ");
print0(algorithm);
println();
}
SQLName definer = x.getDefiner();
if (definer != null) {
print0(ucase ? "DEFINER = " : "definer = ");
definer.accept(this);
println();
}
String sqlSecurity = x.getSqlSecurity();
if (sqlSecurity != null && sqlSecurity.length() > 0) {
print0(ucase ? "SQL SECURITY = " : "sql security = ");
print0(sqlSecurity);
println();
}
decrementIndent();
print0(ucase ? "VIEW " : "view ");
if (x.isIfNotExists()) {