[jOOQ/jOOQ#13107] Fix regression of XMLDatabase

This commit is contained in:
Lukas Eder 2022-02-21 11:57:25 +01:00
parent 6eb6a1dd3c
commit 8e237c0aa9
2 changed files with 13 additions and 9 deletions

View File

@ -513,15 +513,21 @@ class GenerationUtil {
case YUGABYTEDB: {
// The convention is to prepend a "_" to a type to get an array type
if (u != null && u.last().startsWith("_")) {
String[] name = u.getName();
name[name.length - 1] = name[name.length - 1].substring(1);
return name(name);
if (u != null) {
if (u.last().startsWith("_")) {
String[] name = u.getName();
name[name.length - 1] = name[name.length - 1].substring(1);
return name(name);
}
else if (u.last().toUpperCase().endsWith(" ARRAY")) {
String[] name = u.getName();
name[name.length - 1] = name[name.length - 1].replaceFirst("(?i: ARRAY)", "");
return name(name);
}
}
// But there are also arrays with a "vector" suffix
else
return u;
return u;
}
case H2:

View File

@ -2802,11 +2802,9 @@ public abstract class AbstractDatabase implements Database {
case H2:
case POSTGRES:
case YUGABYTEDB:
return "ARRAY".equals(upper);
case H2:
return "ARRAY".equals(upper) || upper.endsWith(" ARRAY");