mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved oracle pl/sql parser.
This commit is contained in:
@@ -3353,8 +3353,10 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
|
||||
if (JdbcConstants.ORACLE.equals(dbType)) {
|
||||
String dataTypeName = dataType.getName();
|
||||
if ((dataTypeName.endsWith("%TYPE") && x.getDefaultValue() == null)
|
||||
|| dataTypeName.equalsIgnoreCase("REF CURSOR")) {
|
||||
boolean printType = (dataTypeName.startsWith("TABLE OF") && x.getDefaultValue() == null)
|
||||
|| dataTypeName.equalsIgnoreCase("REF CURSOR")
|
||||
|| dataTypeName.startsWith("VARRAY(");
|
||||
if (printType) {
|
||||
print0(ucase ? "TYPE " : "type ");
|
||||
}
|
||||
|
||||
@@ -3372,6 +3374,10 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
if (x.isNoCopy()) {
|
||||
print0(ucase ? "NOCOPY " : "nocopy ");
|
||||
}
|
||||
|
||||
if (printType) {
|
||||
print0(ucase ? "IS " : "is ");
|
||||
}
|
||||
} else {
|
||||
if (x.getParamType() == SQLParameter.ParameterType.IN) {
|
||||
print0(ucase ? "IN " : "in ");
|
||||
|
||||
Reference in New Issue
Block a user