Hi Abel

> Apologies for the late reply... The screen to my laptop has been having
> problems the last 2 days.

No worries!

> I had however started on the implementation of the insert ignore
> functionalities. I had planned on doing it in 2 parts ie "insertignore" and
> "insertignoreselect".

I don't think the latter is needed. These syntaxes will already be possible:

new Factory(...).insertIgnoreInto(...).values(...)
new Factory(...).insertIgnoreInto(...).set(...).set(...)
new Factory(...).insertIgnoreInto(...).select(...)

> I have been able to implement what I think is the "insertignore"
> functionality although with my laptop having issues I am unable to do any
> testing. Kindly let me send you the files with a list of the changes I have
> made so that you can start testing when you have time and maybe give me a
> few pointers on where you feel I need to make adjustments and/or changes (if
> any).

You can send those files to the user group if the change is not too
big. Otherwise, you could attach them to this ticket with your
sourceforge account:
https://sourceforge.net/apps/trac/jooq/ticket/1295

Cheers
Lukas

>
> Regards
>
>
> On Tuesday, April 10, 2012 2:28:47 PM UTC+3, Lukas Eder wrote:
>>
>> Hello Abel,
>>
>> > [...] if I had the right guide I can try to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>>
>> OK, very nice. So the new method would probably be called
>> Factory.insertIgnore(...), and it would set a new "ignore" flag in
>> InsertQueryImpl. If you could try to make this work for MySQL, it
>> would be great. I can then take over and simulate this for other
>> dialects.
>>
>> Cheers
>> Lukas
>>
>> 2012/4/10 name256 <[email protected]>:
>> > Hi.
>> >
>> > Many thanks for your quick reply. I am currently working on a project
>> > that I
>> > am sure will benefit from the many features that JOOQ has to offer.
>> > Challenge is the "INSERT IGNORE" implementation is integral to the
>> > success
>> > of this project (I am thinking of changing the implementation from raw
>> > jdbc
>> > to JOOQ) and that is why I felt that if I had the right guide I can try
>> > to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>> >
>> > I have also been looking at the implementation of
>> >  onDuplicateKeyUpdate() to
>> > see whether I can make some headway on its implementation (no luck so
>> > far).
>> > I shall let you know how I am getting along in the coming days.
>> >
>> > Regards
>> >
>> > Abel
>> >
>> > On Tuesday, April 10, 2012 1:13:51 PM UTC+3, Lukas Eder wrote:
>> >>
>> >> 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
>
>
> On Tuesday, April 10, 2012 2:28:47 PM UTC+3, Lukas Eder wrote:
>>
>> Hello Abel,
>>
>> > [...] if I had the right guide I can try to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>>
>> OK, very nice. So the new method would probably be called
>> Factory.insertIgnore(...), and it would set a new "ignore" flag in
>> InsertQueryImpl. If you could try to make this work for MySQL, it
>> would be great. I can then take over and simulate this for other
>> dialects.
>>
>> Cheers
>> Lukas
>>
>> 2012/4/10 name256 <[email protected]>:
>> > Hi.
>> >
>> > Many thanks for your quick reply. I am currently working on a project
>> > that I
>> > am sure will benefit from the many features that JOOQ has to offer.
>> > Challenge is the "INSERT IGNORE" implementation is integral to the
>> > success
>> > of this project (I am thinking of changing the implementation from raw
>> > jdbc
>> > to JOOQ) and that is why I felt that if I had the right guide I can try
>> > to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>> >
>> > I have also been looking at the implementation of
>> >  onDuplicateKeyUpdate() to
>> > see whether I can make some headway on its implementation (no luck so
>> > far).
>> > I shall let you know how I am getting along in the coming days.
>> >
>> > Regards
>> >
>> > Abel
>> >
>> > On Tuesday, April 10, 2012 1:13:51 PM UTC+3, Lukas Eder wrote:
>> >>
>> >> 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
>
>
> On Tuesday, April 10, 2012 2:28:47 PM UTC+3, Lukas Eder wrote:
>>
>> Hello Abel,
>>
>> > [...] if I had the right guide I can try to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>>
>> OK, very nice. So the new method would probably be called
>> Factory.insertIgnore(...), and it would set a new "ignore" flag in
>> InsertQueryImpl. If you could try to make this work for MySQL, it
>> would be great. I can then take over and simulate this for other
>> dialects.
>>
>> Cheers
>> Lukas
>>
>> 2012/4/10 name256 <[email protected]>:
>> > Hi.
>> >
>> > Many thanks for your quick reply. I am currently working on a project
>> > that I
>> > am sure will benefit from the many features that JOOQ has to offer.
>> > Challenge is the "INSERT IGNORE" implementation is integral to the
>> > success
>> > of this project (I am thinking of changing the implementation from raw
>> > jdbc
>> > to JOOQ) and that is why I felt that if I had the right guide I can try
>> > to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>> >
>> > I have also been looking at the implementation of
>> >  onDuplicateKeyUpdate() to
>> > see whether I can make some headway on its implementation (no luck so
>> > far).
>> > I shall let you know how I am getting along in the coming days.
>> >
>> > Regards
>> >
>> > Abel
>> >
>> > On Tuesday, April 10, 2012 1:13:51 PM UTC+3, Lukas Eder wrote:
>> >>
>> >> 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
>
>
> On Tuesday, April 10, 2012 2:28:47 PM UTC+3, Lukas Eder wrote:
>>
>> Hello Abel,
>>
>> > [...] if I had the right guide I can try to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>>
>> OK, very nice. So the new method would probably be called
>> Factory.insertIgnore(...), and it would set a new "ignore" flag in
>> InsertQueryImpl. If you could try to make this work for MySQL, it
>> would be great. I can then take over and simulate this for other
>> dialects.
>>
>> Cheers
>> Lukas
>>
>> 2012/4/10 name256 <[email protected]>:
>> > Hi.
>> >
>> > Many thanks for your quick reply. I am currently working on a project
>> > that I
>> > am sure will benefit from the many features that JOOQ has to offer.
>> > Challenge is the "INSERT IGNORE" implementation is integral to the
>> > success
>> > of this project (I am thinking of changing the implementation from raw
>> > jdbc
>> > to JOOQ) and that is why I felt that if I had the right guide I can try
>> > to
>> > do an implementation of this functionality. I will use your suggestions
>> > as a
>> > guide and will get back to you as I progress along.
>> >
>> > I have also been looking at the implementation of
>> >  onDuplicateKeyUpdate() to
>> > see whether I can make some headway on its implementation (no luck so
>> > far).
>> > I shall let you know how I am getting along in the coming days.
>> >
>> > Regards
>> >
>> > Abel
>> >
>> > On Tuesday, April 10, 2012 1:13:51 PM UTC+3, Lukas Eder wrote:
>> >>
>> >> 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