jOOQ 3.7+ unterstützt ON CONFLICT von PostgreSQL 9.5 Klausel:
- https://github.com/jOOQ/jOOQ/issues/4299
- https://www.postgresql.org/docs/ 9.5/static/sql-insert.html
Die vollständige herstellerspezifische PostgreSQL-Syntax wird noch nicht unterstützt, aber Sie können die MySQL- oder H2-Syntax verwenden, die beide mit ON CONFLICT von PostgreSQL emuliert werden können :
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();