MCPcopy Create free account
hub / github.com/jOOQ/jOOQ / toJSONArrays

Method toJSONArrays

jOOQ/src/main/java/org/jooq/impl/Multiset.java:744–763  ·  view source on GitHub ↗
(Context<?> ctx, Field<?> field)

Source from the content-addressed store, hash-verified

742 }
743
744 private static final Field<?> toJSONArrays(Context<?> ctx, Field<?> field) {
745 boolean transform = false;
746
747 switch (ctx.family()) {
748
749
750 case POSTGRES:
751 case YUGABYTEDB:
752 transform = hasFormattedTypes(field.getDataType());
753 break;
754 }
755
756 return !transform ? field : transformNestedTypes(
757 field,
758 toJSONArrayOfUDTs(ctx, field),
759 toJSONArrayOfFormatted(ctx, field),
760 () -> field,
761 toJSONUDT(ctx, field)
762 );
763 }
764
765 private static final boolean hasFormattedTypes(DataType<?> t) {
766 if (t.isArray()) {

Callers 1

castForJSONMethod · 0.95

Calls 7

hasFormattedTypesMethod · 0.95
transformNestedTypesMethod · 0.95
toJSONArrayOfUDTsMethod · 0.95
toJSONUDTMethod · 0.95
familyMethod · 0.65
getDataTypeMethod · 0.65

Tested by

no test coverage detected