[jOOQ/jOOQ#9085] [jOOQ/jOOQ#13375] [jOOQ/jOOQ#14074] Update ArrayTable
The SQLDialect.DEFAULT behaviour should be that of the standard SQL for array tables
This commit is contained in:
parent
eba8a527bf
commit
f55fa8a770
@ -112,27 +112,27 @@ final class ArrayOfValues extends AbstractTable<Record> implements UNotYetImplem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case CUBRID:
|
||||
|
||||
case DERBY:
|
||||
|
||||
case FIREBIRD:
|
||||
|
||||
case IGNITE:
|
||||
|
||||
|
||||
case MARIADB:
|
||||
|
||||
case MYSQL:
|
||||
|
||||
|
||||
|
||||
|
||||
case SQLITE:
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.visit(new ArrayTableEmulation(array).as(alias, fieldAliases));
|
||||
break;
|
||||
|
||||
|
||||
@ -176,18 +176,30 @@ final class ArrayTable extends AbstractTable<Record> implements UNotYetImplement
|
||||
case H2:
|
||||
return new H2ArrayTable().as(alias);
|
||||
|
||||
// [#756] These dialects need special care when aliasing unnested
|
||||
// arrays
|
||||
// Most dialects can simulate unnested arrays using UNION ALL
|
||||
|
||||
|
||||
|
||||
case HSQLDB:
|
||||
case POSTGRES:
|
||||
case YUGABYTEDB:
|
||||
return new PostgresHSQLDBTable().as(alias, fieldAliases);
|
||||
|
||||
// Other dialects can simulate unnested arrays using UNION ALL
|
||||
default:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case CUBRID:
|
||||
case DERBY:
|
||||
case FIREBIRD:
|
||||
case IGNITE:
|
||||
case MARIADB:
|
||||
case MYSQL:
|
||||
case SQLITE:
|
||||
if (array.getDataType().getType().isArray() && array instanceof Param)
|
||||
return emulate();
|
||||
|
||||
@ -200,6 +212,10 @@ final class ArrayTable extends AbstractTable<Record> implements UNotYetImplement
|
||||
|
||||
else
|
||||
return DSL.table("{0}", array).as(alias);
|
||||
|
||||
// [#756] The standard SQL behaviour
|
||||
default:
|
||||
return new PostgresHSQLDBTable().as(alias, fieldAliases);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user