improved oracle pl/sql parser.

This commit is contained in:
wenshao
2017-05-13 19:19:34 +08:00
parent a5e4bdd645
commit 06064b76b6
21 changed files with 1258 additions and 48 deletions
@@ -24,6 +24,7 @@ public class SQLParameter extends SQLObjectImpl {
private SQLExpr defaultValue;
private ParameterType paramType;
private boolean noCopy = false;
private boolean constant = false;
public SQLExpr getDefaultValue() {
return defaultValue;
@@ -81,4 +82,12 @@ public class SQLParameter extends SQLObjectImpl {
public void setNoCopy(boolean noCopy) {
this.noCopy = noCopy;
}
public boolean isConstant() {
return constant;
}
public void setConstant(boolean constant) {
this.constant = constant;
}
}
@@ -46,11 +46,14 @@ public class SQLBlockStatement extends SQLStatementImpl {
this.labelName = labelName;
}
public SQLStatement exception;
@Override
public void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
acceptChild(visitor, parameters);
acceptChild(visitor, statementList);
acceptChild(visitor, exception);
}
visitor.endVisit(this);
}
@@ -63,4 +66,11 @@ public class SQLBlockStatement extends SQLStatementImpl {
this.parameters = parameters;
}
public SQLStatement getException() {
return exception;
}
public void setException(SQLStatement exception) {
this.exception = exception;
}
}
@@ -37,6 +37,8 @@ public class SQLCreateProcedureStatement extends SQLStatementImpl {
// for oracle
private String javaCallSpec;
private SQLName authid;
@Override
public void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
@@ -75,6 +77,17 @@ public class SQLCreateProcedureStatement extends SQLStatementImpl {
this.block = block;
}
public SQLName getAuthid() {
return authid;
}
public void setAuthid(SQLName authid) {
if (authid != null) {
authid.setParent(this);
}
this.authid = authid;
}
public boolean isOrReplace() {
return orReplace;
}