Hello Abel,

Good idea, and thanks for the offer of implementing this. I'll track
this idea as feature request #1295:
https://sourceforge.net/apps/trac/jooq/ticket/1295

For better maintainability, I would prefer if such DSL features
wouldn't be implemented in dialect-specific factories, but in the
global Factory with an appropriate org.jooq.Support annotation to
indicate the dialects supporting this clause. Specifically, MySQL's
INSERT IGNORE clause could be simulated using the SQL:2003 standard
MERGE statement in DB2, HSQLDB, Oracle, SQL Server, and Sybase SQL
Anywhere.

On the other hand, there seems to be no difference between executing
INSERT IGNORE and INSERT .. ON DUPLICATE KEY UPDATE SET pk = pk, where
the UPDATE part is effectively optimised away in a simple test by this
Stack Overflow user:

http://stackoverflow.com/a/7853634/521799

So, INSERT IGNORE could be rendered "as is" for MySQL, and simulated
for CUBRID (Which has the ON DUPLICATE KEY UPDATE clause), DB2,
HSQLDB, Oracle, SQL Server, Sybase SQL Anywhere (which have the MERGE
statement)

Any other opinions welcome!

Cheers
Lukas

2012/4/10 name256 <[email protected]>:
> Hi,
>
> I am a newbie to JOOQ. I was wondering whether someone has been able to
> implement an implementation of insert ignore for the MYSQLFactory. Kindly
> let me know. I would't mind a guide to doing this myself as well as it will
> give me a better insight into JOOQ.
>
> Regards.
>
> Abel

Reply via email to