What count does insertInto()...execute() return when using onDuplicateKeyUpdate() ?
3 views
Skip to first unread message
Paul Hamer
unread,
Oct 3, 2017, 5:16:50 AM10/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jOOQ User Group
Hi,
I'm using the following construct:
int count = dsl.insertInto(...) .set(...) .set(...) .onDuplicateKeyUpdate() .set(...) .execute();
My question is, what will "count" contain? The number of added rows, or the number of updated rows? Or perhaps the sum of both? I can't seem to find it in the documentation.
Kind regards,
Paul
Paul Hamer
unread,
Oct 3, 2017, 5:20:08 AM10/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jOOQ User Group
LOL, I just read the execute() javadoc again and found:
Merge : the result may have no meaning
Guess that answers my question ;-)
I missed it before, because I did not trigger on "merge".