[jOOQ/jOOQ#12611] SQLDataType.null generated when using XMLDatabase with

lower case array type
This commit is contained in:
Lukas Eder 2021-11-09 09:14:24 +01:00
parent 2aa166f846
commit f2a7dfd881
2 changed files with 7 additions and 10 deletions

View File

@ -514,16 +514,16 @@ class GenerationUtil {
}
// But there are also arrays with a "vector" suffix
else {
else
return u;
}
}
case H2:
return name(H2DataType.OTHER.getTypeName());
case HSQLDB: {
case HSQLDB:
default: {
// In HSQLDB 2.2.5, there has been an incompatible INFORMATION_SCHEMA change around the
// ELEMENT_TYPES view. Arrays are now described much more explicitly
@ -532,11 +532,9 @@ class GenerationUtil {
// This is for backwards compatibility
else
return name(t.replace(" ARRAY", ""));
return name(t.replaceFirst("(?i: ARRAY)", ""));
}
}
throw new SQLDialectNotSupportedException("getArrayBaseType() is not supported for dialect " + dialect);
}
static ExpressionType expressionType(String expression) {

View File

@ -2796,16 +2796,15 @@ public abstract class AbstractDatabase implements Database {
case H2:
case POSTGRES:
case YUGABYTE:
return "ARRAY".equals(dataType);
return "ARRAY".equals(dataType.toUpperCase());
case HSQLDB:
default:
// TODO: Is there any more robust way to recognise these?
// For instance, there could be a UDT that is called this way
return dataType.endsWith(" ARRAY");
return dataType.toUpperCase().endsWith(" ARRAY");
}
return false;
}
protected static final String fetchedSize(Collection<?> fetched, Collection<?> included) {