Get Jooq Update Or Insert Background. Jooq models this through a set(field<t>, select. It looks like nice, but as sql query more complex jooq construction more obscure.

How Do Upsert And Merge Work In Oracle Sql Server Postgresql And Mysql Vlad Mihalcea
How Do Upsert And Merge Work In Oracle Sql Server Postgresql And Mysql Vlad Mihalcea from vladmihalcea.com
As i dive more and more into jooq i am getting bit over and over by its overly relaxed and unsafe approach to column names. Trying to use jooq to work with db (mysql). You can create your own insert, insert select, update, delete queries.

I want to insert a new record if annd only if there are no records.for example.

Historically, jooq did not execute any queries for empty tablerecord.insert() or updatablerecord.update() or store() calls. Why not use replace instead of update+insert? Updatablerecords are attachable, which means that they hold an underlying configuration that they can be detached from. Building typesafe sql using dsl api.