Is it possible to only update some fields when a duplicate is found, using jOOQ's batchAll()
loader? Similar to how onDublicateKeyUpdate()
can be used for single records: https://www.jooq.org/doc/latest/manual/sql-building/sql-statements/insert-statement/insert-on-duplicate-key/.
The code I want to change, to only update one field when there's a duplicate:
dsl.loadInto(TABLE)
.batchAll()
.onDuplicateKeyUpdate()
.loadRecords(records)
.fields(TABLE.fields())
.execute();