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

Method hasFormattedTypes

jOOQ/src/main/java/org/jooq/impl/Multiset.java:765–782  ·  view source on GitHub ↗
(DataType<?> t)

Source from the content-addressed store, hash-verified

763 }
764
765 private static final boolean hasFormattedTypes(DataType<?> t) {
766 if (t.isArray()) {
767 DataType<?> ct = t.getArrayComponentDataType();
768
769 // [#19067] This currently applies to arrays of UDTs only. Let's not complicate things for ordinary arrays.
770 if (ConvertedDataType.delegate(ct) instanceof UDTDataType<?> ut)
771 return hasFormattedTypes(ut);
772 else
773 return ct.getBinding().formatter() != null;
774 }
775 else if (ConvertedDataType.delegate(t) instanceof UDTDataType<?> ut) {
776 for (Field<?> f : ut.getRow().fields())
777 if (hasFormattedTypes(f.getDataType()))
778 return true;
779 }
780
781 return false;
782 }
783
784 private static final Function<? super UDTDataType<?>, ? extends Field<?>> toJSONArrayOfUDTs(Context<?> ctx, Field<?> field) {
785 return ut -> {

Callers 1

toJSONArraysMethod · 0.95

Calls 8

delegateMethod · 0.95
isArrayMethod · 0.65
formatterMethod · 0.65
getBindingMethod · 0.65
fieldsMethod · 0.65
getRowMethod · 0.65
getDataTypeMethod · 0.65

Tested by

no test coverage detected