mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved oracle sql parser.
This commit is contained in:
@@ -588,6 +588,10 @@ public class SQLTransformUtils {
|
||||
dataType = new SQLDataTypeImpl(SQLDataType.Constants.TIMESTAMP, 0);
|
||||
} else if (nameHash == FnvHash.Constants.TIMESTAMP) {
|
||||
x.setName(SQLDataType.Constants.TIMESTAMP);
|
||||
if (x.isWithLocalTimeZone()) {
|
||||
x.setWithLocalTimeZone(false);
|
||||
x.setWithTimeZone(null);
|
||||
}
|
||||
dataType = x;
|
||||
} else if (nameHash == FnvHash.Constants.DATETIME) {
|
||||
int len = -1;
|
||||
@@ -669,6 +673,13 @@ public class SQLTransformUtils {
|
||||
}
|
||||
}
|
||||
|
||||
if (nameHashCode64 == FnvHash.Constants.SYSTIMESTAMP) {
|
||||
SQLMethodInvokeExpr xx = x.clone();
|
||||
xx.setMethodName("CURRENT_TIMESTAMP");
|
||||
xx.setParent(x.getParent());
|
||||
return xx;
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user