What I actually want is to write following query in JOOQ:
stmt = connection.prepareStatement(
"INSERT INTO `tbl` (`name`, `service_id`, `device_id`) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE `id` = LAST_INSERT_ID(`id`)",
Statement.RETURN_GENERATED_KEYS
);
I'm not able to find a way to do this in JOOQ. Is it possible?