jOOQ 3.7+ obsługuje ON CONFLICT w PostgreSQL 9.5 klauzula:
- https://github.com/jOOQ/jOOQ/issues/4299
- https://www.postgresql.org/docs/ 9.5/static/sql-insert.html
Pełna składnia specyficzna dla dostawcy PostgreSQL nie jest jeszcze obsługiwana, ale możesz użyć składni MySQL lub H2, które mogą być emulowane przy użyciu ON CONFLICT PostgreSQL :
MySQL INSERT .. ON DUPLICATE KEY UPDATE :
DSL.using(configuration)
.insertInto(TABLE)
.columns(ID, A, B)
.values(1, "a", "b")
.onDuplicateKeyUpdate()
.set(A, "a")
.set(B, "b")
.execute();
H2 MERGE INTO ..
DSL.using(configuration)
.mergeInto(TABLE, A, B, C)
.values(1, "a", "b")
.execute();