[jOOQ/jOOQ#12168] Deeply nested MULTISET produce quoted JSON in MariaDB
This commit is contained in:
parent
4bae0a5129
commit
d46b8daecf
@ -23843,7 +23843,7 @@ public class DSL {
|
||||
* {@link SelectForStep#forXML()}. jOOQ produces an XML encoding that is
|
||||
* compatible with {@link DSLContext#fetchFromXML(String)}. Future jOOQ
|
||||
* versions will make this format configurable according to
|
||||
* {@link XMLFormat.RecordFormau}.</li>
|
||||
* {@link XMLFormat.RecordFormat}.</li>
|
||||
* <li>{@link NestedCollectionEmulation#NATIVE}: A few dialects have native
|
||||
* support for MULTISET.</li>
|
||||
* <li>{@link NestedCollectionEmulation#DEFAULT}: By default, jOOQ chooses
|
||||
|
||||
@ -185,11 +185,11 @@ implements
|
||||
|
||||
// Workaround for https://jira.mariadb.org/browse/MDEV-13701
|
||||
if (entries.size() > 1) {
|
||||
ctx.visit(jsonMerge(ctx, "{}", Tools.map(entries, e -> jsonObject(e), Field[]::new)));
|
||||
ctx.visit(JSONEntryImpl.jsonMerge(ctx, "{}", Tools.map(entries, e -> jsonObject(e), Field[]::new)));
|
||||
}
|
||||
else if (!entries.isEmpty() && isJSONArray((first = entries.iterator().next()).value())) {
|
||||
ctx.visit(jsonObject(
|
||||
key(first.key()).value(jsonMerge(ctx, "[]", first.value()))
|
||||
key(first.key()).value(JSONEntryImpl.jsonMerge(ctx, "[]", first.value()))
|
||||
));
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user