[jOOQ/jOOQ#13643] Wrong result column type for requested conversion when reading JSONB_ARRAY nested in ROW in DB2
This commit is contained in:
parent
9672f84197
commit
afc404eb44
@ -193,7 +193,7 @@ implements
|
||||
|
||||
default: {
|
||||
JSONNull jsonNull;
|
||||
JSONReturning jsonReturning = new JSONReturning(returning);
|
||||
JSONReturning jsonReturning;
|
||||
|
||||
// Workaround for https://github.com/h2database/h2database/issues/2496
|
||||
if (ctx.family() == H2 && fields.isEmpty())
|
||||
@ -201,6 +201,14 @@ implements
|
||||
else
|
||||
jsonNull = new JSONNull(onNull);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonReturning = new JSONReturning(returning);
|
||||
|
||||
Field<T> jsonArray = CustomField.of(N_JSON_ARRAY, getDataType(), c ->
|
||||
c.visit(N_JSON_ARRAY).sql('(').visit(QueryPartListView.wrap(mapped, jsonNull, jsonReturning).separator("")).sql(')')
|
||||
);
|
||||
|
||||
@ -221,7 +221,7 @@ implements
|
||||
|
||||
private final void acceptStandard(Context<?> ctx) {
|
||||
JSONNull jsonNull;
|
||||
JSONReturning jsonReturning = new JSONReturning(returning);
|
||||
JSONReturning jsonReturning;
|
||||
|
||||
// Workaround for https://github.com/h2database/h2database/issues/2496
|
||||
if (entries.isEmpty() && ctx.family() == H2)
|
||||
@ -234,6 +234,14 @@ implements
|
||||
else
|
||||
jsonNull = new JSONNull(onNull);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonReturning = new JSONReturning(returning);
|
||||
|
||||
ctx.visit(N_JSON_OBJECT).sql('(').visit(QueryPartListView.wrap(QueryPartCollectionView.wrap(entries), jsonNull, jsonReturning).separator("")).sql(')');
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user