[jOOQ/jOOQ#8439] PostgreSQL: array(<domain over UUID>) causes exception
This commit is contained in:
parent
ac9aa44b09
commit
7c72fe155b
@ -4908,15 +4908,23 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
|
||||
final UUID get0(BindingGetResultSetContext<U> ctx) throws SQLException {
|
||||
switch (ctx.family()) {
|
||||
|
||||
// [#1624] Some JDBC drivers natively support the
|
||||
// java.util.UUID data type
|
||||
|
||||
// [#1624] Some JDBC drivers natively support the java.util.UUID data type
|
||||
// [#8439] In edge cases (e.g. arrays over domains) the type info may have
|
||||
// been lost between server and JDBC driver, so let's expect PGobject
|
||||
|
||||
|
||||
case H2:
|
||||
case POSTGRES:
|
||||
case YUGABYTEDB:
|
||||
return Convert.convert(ctx.resultSet().getObject(ctx.index()), UUID.class);
|
||||
case YUGABYTEDB: {
|
||||
Object o = ctx.resultSet().getObject(ctx.index());
|
||||
|
||||
if (o == null)
|
||||
return null;
|
||||
else if (o instanceof UUID u)
|
||||
return u;
|
||||
else
|
||||
return Convert.convert(o.toString(), UUID.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user