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

Method copyValue

jOOQ/src/main/java/org/jooq/impl/Tools.java:3830–3839  ·  view source on GitHub ↗

[#2591] Type-safely copy a value from one record to another, preserving flags.

(AbstractRecord target, Field<T> targetField, Record source, Field<?> sourceField)

Source from the content-addressed store, hash-verified

3828 * [#2591] Type-safely copy a value from one record to another, preserving flags.
3829 */
3830 static final <T> void copyValue(AbstractRecord target, Field<T> targetField, Record source, Field<?> sourceField) {
3831 DataType<T> targetType = targetField.getDataType();
3832
3833 int targetIndex = indexOrFail(target.fieldsRow(), targetField);
3834 int sourceIndex = indexOrFail(source.fieldsRow(), sourceField);
3835
3836 target.values[targetIndex] = targetType.convert(source.get(sourceIndex));
3837 target.originals[targetIndex] = targetType.convert(source.original(sourceIndex));
3838 target.touched.set(targetIndex, source.touched(sourceIndex));
3839 }
3840
3841 /**
3842 * Map a {@link Catalog} according to the configured {@link org.jooq.SchemaMapping}

Callers 1

mapperMethod · 0.95

Calls 8

indexOrFailMethod · 0.95
getDataTypeMethod · 0.65
fieldsRowMethod · 0.65
convertMethod · 0.65
getMethod · 0.65
originalMethod · 0.65
setMethod · 0.65
touchedMethod · 0.65

Tested by

no test coverage detected