I am trying to perform an UPSERT in PostgreSQL using the jOOQ library.
For doing this I am currently trying to implement the following SQL statement in jOOQ: https://st
Here is an upsert utility method derived from Lucas' solution above for UpdatableRecord objects:
public static int upsert(final DSLContext dslContext, final UpdatableRecord record) { return dslContext.insertInto(record.getTable()) .set(record) .onDuplicateKeyUpdate() .set(record) .execute(); }