[#2591] Type-safely copy a value from one record to another, preserving flags.
(AbstractRecord target, Field<T> targetField, Record source, Field<?> sourceField)
| 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} |
no test coverage detected