No problem, I shall make the appropriate changes. I should be done with the changes by tomorrow.
Cheers ----- Original Message ----- From: "Lukas Eder" <[email protected]> To: "Abel Birya" <[email protected]> Cc: [email protected] Sent: Saturday, April 14, 2012 2:44:18 PM Subject: Re: JOOQ INSERT IGNORE Hello Abel, I have given this some more thought. As a matter of fact, I wonder if INSERT IGNORE INTO ... is really the most optimal syntax for the jOOQ API. Adding Factory.insertIgnoreInto() methods would follow MySQL syntax, which is fine. But adding an .onDuplicateKeyIgnore() clause may be more intuitive, given that we already have the .onDuplicateKeyUpdate() clause. This would then be more similar to jOOQ's pre-existing Loader API: http://www.jooq.org/javadoc/latest/org/jooq/LoaderOptionsStep.html#onDuplicateKeyIgnore%28%29 In that way, we could write: ------------------------------------------------------ create.insertInto(TABLE, F1, F2, F3) .values(v1, v2, v3) .onDuplicateKeyIgnore() .execute(); ------------------------------------------------------ Instead of ------------------------------------------------------ create.insertIgnoreInto(TABLE, F1, F2, F3) .values(v1, v2, v3) .execute(); ------------------------------------------------------ What do you think about this? Cheers Lukas 2012/4/13 Lukas Eder <[email protected]>: > Hello Abel, > >> Point well taken. I was using the onDuplicateUpdate() method as a guide >> and that is where it led me :) > > Yes, many paths lead to Rome :-) > >> The files that I used are the ones in the source file jar from the >> package I downloaded. Let me give it one more try and if I am unable to get >> it done then you can go ahead and implement the change. > > Sure, no problem > >> From experience, I >> have found that the best way to learn about a library's inner workings is to >> implement custom functionality. >> On the issues of the dated files, for some >> reason I seem to be using JOOQ 2.1.0. I have downloaded the latest version >> and will go through the codebase later today. On the same note, kindly avail >> me the url of your svn repo so that I can sync my files. > > Yes, you'll have more luck implementing against SVN trunk > > You'll find the sources here: > https://jooq.svn.sourceforge.net/svnroot/jooq/ > > More info can be found here: > https://sourceforge.net/scm/?type=svn&group_id=283484 > > You may need to use maven to generate some XJC-generated sources > > Cheers > Lukas
