diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationUtil.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationUtil.java index 2e853d11ca..8f311380ae 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationUtil.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/GenerationUtil.java @@ -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) { diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java index 246bc6ce37..e6ce1c79fe 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java @@ -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) {