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:
@@ -3349,7 +3349,15 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
decrementIndent();
|
||||
|
||||
} else {
|
||||
SQLDataType dataType = x.getDataType();
|
||||
|
||||
if (JdbcConstants.ORACLE.equals(dbType)) {
|
||||
String dataTypeName = dataType.getName();
|
||||
if ((dataTypeName.endsWith("%TYPE") && x.getDefaultValue() == null)
|
||||
|| dataTypeName.equalsIgnoreCase("REF CURSOR")) {
|
||||
print0(ucase ? "TYPE " : "type ");
|
||||
}
|
||||
|
||||
x.getName().accept(this);
|
||||
if (x.getParamType() == SQLParameter.ParameterType.IN) {
|
||||
print0(ucase ? " IN " : " in ");
|
||||
@@ -3376,7 +3384,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
print(' ');
|
||||
}
|
||||
|
||||
x.getDataType().accept(this);
|
||||
dataType.accept(this);
|
||||
|
||||
if (x.getDefaultValue() != null) {
|
||||
print0(" := ");
|
||||
|
||||
Reference in New Issue
Block a user