@Override
public DataType getDataType(int jdbcType, String name, int size) {
// Doesn't support DISTINCT over LOB types
if (jdbcType == Types.CLOB || "NCLOB".equals(name)) {
return new SQLCharacterString(this, name, false);
}
if (jdbcType == Types.BLOB) {
return new SQLBinary(this, name, false);
}
DataType standard = super.getDataType(jdbcType, name, size);
if (standard != null) return standard;
// Special handling for TIMESTAMP(x) WITH LOCAL TIME ZONE
if (name.contains("WITH LOCAL TIME ZONE") || "TIMESTAMPLTZ".equals(name)) {
return new OracleCompatibilityTimeZoneLocalDataType(this, name);
}
// Special handling for TIMESTAMP(x) WITH TIME ZONE
if(name.contains("WITH TIME ZONE") || "TIMESTAMPTZ".equals(name)) {
return new OracleCompatibilityTimeZoneDataType(this, name);
}
// Oracle-specific character string types
if ("VARCHAR2".equals(name) || "NVARCHAR2".equals(name)) {
return new SQLCharacterString(this, name, true);
}
// Oracle-specific floating point types
if ("BINARY_FLOAT".equals(name) || "BINARY_DOUBLE".equals(name)) {
return new SQLApproximateNumeric(this, name);