Re: Multi row insert with On Duplicate Update

175 views
Skip to first unread message

Lukas Eder

unread,
Jan 30, 2013, 7:19:31 AM1/30/13
to jooq...@googlegroups.com
Hello,

I think that your use-case is not yet properly supported by jOOQ. I will have to run a proper integration test to be sure about that, though. I have registered #2134 for this:
https://github.com/jOOQ/jOOQ/issues/2134

Note, that if the VALUES() function referenced in the UPDATE clause of your INSERT statement is the only thing missing, you could try using plain SQL for that. Something along the lines of:

.set(AGE, Factory.field("VALUES({0})", Integer.class, AGE));

Cheers
Lukas

2013/1/27 <tbug...@gmail.com>
Is there anyway to replicate this code in jOOQ?


I'd like to insert multiple rows at a time for the sake of performance, but it seems like when I try to use multiple values() constructers, the following OnDuplicateKeyUpdate.set(...) method will run for each values() constructor, but I would like to have different set methods for each values constructor. Is this possible?

--
 
 

Reply all
Reply to author
Forward
0 new messages