MCPcopy Index your code
hub / github.com/jOOQ/jOOQ / acceptStandard

Method acceptStandard

jOOQ/src/main/java/org/jooq/impl/JSONObject.java:408–432  ·  view source on GitHub ↗
(Context<?> ctx)

Source from the content-addressed store, hash-verified

406 }
407
408 private final void acceptStandard(Context<?> ctx) {
409 JSONNull jsonNull;
410 JSONReturning jsonReturning;
411
412 // Workaround for https://github.com/h2database/h2database/issues/2496
413 if (entries.isEmpty() && ctx.family() == H2)
414 jsonNull = new JSONNull(JSONOnNull.NULL_ON_NULL);
415
416 // Some dialects support the JSONNull clause only for non-empty JSON_OBJECT
417 // E.g. https://trino.io/docs/current/functions/json.html#json-object
418 else if (entries.isEmpty() && JSONNull.NO_SUPPORT_NULL_ON_EMPTY.contains(ctx.dialect()))
419 jsonNull = new JSONNull(null);
420 else
421 jsonNull = new JSONNull(onNull);
422
423
424
425
426
427
428
429 jsonReturning = new JSONReturning(returning);
430
431 ctx.visit(N_JSON_OBJECT).sql('(').visit(QueryPartListView.wrap(QueryPartCollectionView.wrap(entries), jsonNull, jsonReturning).separator("")).sql(')');
432 }
433
434
435

Callers 1

accept0Method · 0.95

Calls 9

wrapMethod · 0.95
wrapMethod · 0.95
isEmptyMethod · 0.65
familyMethod · 0.65
containsMethod · 0.65
dialectMethod · 0.65
sqlMethod · 0.65
visitMethod · 0.65
separatorMethod · 0.65

Tested by

no test coverage detected