We could move to using DBIC's find_or_create method as an alternative: http://search.cpan.org/~ribasushi/DBIx-Class-0.082820/lib/DBIx/Class/ResultSet.pm#find_or_create

I know I've submitted at least one patch that uses that instead of the classic INSERT statement.

Kyle

http://www.kylehall.info
ByWater Solutions ( http://bywatersolutions.com )
Meadville Public Library ( http://www.meadvillelibrary.org )
Crawford County Federated Library System ( http://www.ccfls.org )
Mill Run Technology Solutions ( http://millruntech.com )

On Tue, Apr 7, 2015 at 11:53 AM, Christopher Nighswonger <chris.nighswonger@gmail.com> wrote:
On Tue, Apr 7, 2015 at 11:33 AM, Mark Tompsett <mtompset@hotmail.com> wrote:
Greetings,

We have started the move to DBIx, which will grant us back-end portability eventually. Why would we use a mySQL-ism? Is there no nicer way to do this?

A long time ago, when I first opened this bug, I had hoped to code up a sub which would handle the check to see if the pref existed or not. The thought was to avoid the use of MySQLisms.

I would think that this is a quick-and-easy, have-it-today fix, with the ultimate goal to be DB agnostic.

Kind regards,
Chris



 

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/