It would be nice if the DSL supported the returning() step on a conflict
update. This would look like,
return create.insertInto(table, field1, field2)
.values(value1, value2)
.values(value3, value4);
.onDuplicateKeyUpdate()
.set(field1, value1)
.set(field2, value2)
.returning()
.fetchOne();
Instead the operation has to be broken up into a few statements,
insert = create.insertInto(table, field1, field2)
.values(value1, value2)
.values(value3, value4);
insert.onDuplicateKeyUpdate()
.set(field1, value1)
.set(field2, value2)
return insert.returning().fetchOne();
The resulting SQL query is perfect, but it may not be obvious to some users
that they can chain operations out of order.
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.