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

Method acceptStandard

jOOQ/src/main/java/org/jooq/impl/JSONArray.java:348–388  ·  view source on GitHub ↗
(Context<?> ctx, QueryPartCollectionView<Field<?>> mapped)

Source from the content-addressed store, hash-verified

346 }
347
348 private final void acceptStandard(Context<?> ctx, QueryPartCollectionView<Field<?>> mapped) {
349 JSONNull jsonNull;
350 JSONReturning jsonReturning;
351
352 // Workaround for https://github.com/h2database/h2database/issues/2496
353 if (fields.isEmpty() && ctx.family() == H2)
354 jsonNull = new JSONNull(JSONOnNull.NULL_ON_NULL);
355 else if (fields.isEmpty() && JSONNull.NO_SUPPORT_NULL_ON_EMPTY.contains(ctx.dialect()))
356 jsonNull = new JSONNull(null);
357 else
358 jsonNull = new JSONNull(onNull);
359
360
361
362
363
364
365
366 jsonReturning = new JSONReturning(returning);
367
368 Field<T> jsonArray = CustomField.of(N_JSON_ARRAY, getDataType(), c ->
369 c.visit(N_JSON_ARRAY).sql('(').visit(QueryPartListView.wrap(mapped, jsonNull, jsonReturning).separator("")).sql(')')
370 );
371
372 switch (ctx.family()) {
373
374
375
376
377
378
379
380
381
382
383
384 default:
385 ctx.visit(jsonArray);
386 break;
387 }
388 }
389
390
391

Callers 1

accept0Method · 0.95

Calls 10

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

Tested by

no test coverage detected