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

Method fields0

jOOQ/src/main/java/org/jooq/impl/LoaderImpl.java:571–607  ·  view source on GitHub ↗
(Object[] row)

Source from the content-addressed store, hash-verified

569 }
570
571 private final void fields0(Object[] row) {
572 Field<?>[] f = new Field[row.length];
573
574 // [#5145] When loading arrays, or when CSV headers are ignored,
575 // the source is still null at this stage.
576 if (source == null)
577 if (fieldsCorresponding)
578 throw new LoaderConfigurationException("Using fieldsCorresponding() requires field names to be available in source.");
579 else
580 source = Tools.fields(row.length);
581
582 if (fieldMapper != null)
583 for (int i = 0; i < row.length; i++) {
584 final int index = i;
585
586 f[i] = fieldMapper.map(new LoaderFieldContext() {
587 @Override
588 public int index() {
589 return index;
590 }
591
592 @Override
593 public Field<?> field() {
594 return source[index];
595 }
596 });
597 }
598
599 else if (fieldsCorresponding)
600 for (int i = 0; i < row.length; i++) {
601 f[i] = table.field(source[i]);
602 if (f[i] == null)
603 log.info("No column in target table " + table + " found for input field " + source[i]);
604 }
605
606 fields(f);
607 }
608
609 @Override
610 public final LoaderImpl<R> ignoreRows(int number) {

Callers 6

executeSQLMethod · 0.95
lookupNestedMethod · 0.45
countFlattenedMethod · 0.45
flattenCollectionMethod · 0.45
setValueMethod · 0.45
UDTFieldImplMethod · 0.45

Calls 5

fieldsMethod · 0.95
fieldsMethod · 0.95
mapMethod · 0.65
fieldMethod · 0.65
infoMethod · 0.65

Tested by

no test coverage detected