improved oracle pl/sql parser.

This commit is contained in:
wenshao
2017-05-12 10:46:30 +08:00
parent 44ec0112c1
commit 7cd62c0eb7
5 changed files with 212 additions and 4 deletions
@@ -1025,6 +1025,8 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
x.getSubQuery().accept(this);
print(')');
println();
} else if (parent instanceof SQLOpenStatement) {
x.getSubQuery().accept(this);
} else {
print('(');
incrementIndent();
@@ -3201,6 +3203,12 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
public boolean visit(SQLOpenStatement x) {
print0(ucase ? "OPEN " : "open ");
print0(x.getCursorName());
SQLExpr forExpr = x.getFor();
if (forExpr != null) {
print0(ucase ? " FOR " : "for ");
forExpr.accept(this);
}
return false;
}