[Dbix-class] How to deal with right joins while under test/sqlite

Trevor Leffler tleffler at uw.edu
Fri Nov 3 19:55:47 GMT 2017


Up until recently I've been exclusively using a mysql database. I've started writing tests using Test::DBIx::Class, which loads my schema into an in-memory sqlite database. I got it working after making a few minor code changes to my Result/ResultSet classes. For example, I had to replace the use of the mysql-specific utc_timestamp() function in a couple queries with a DateTime string.

Now I'm getting a "RIGHT and FULL OUTER JOINs are not currently supported" error while running under test (sqlite). A Result class has a has_many relationship with a {join_type => 'right'}.

I'm curious what are folks doing here. Are you... avoiding right join relationships and using alternate SQL to achieve the same queries? Doing db feature detection to "do the right thing"? Not using sqlite for unit testing?

Thanks,
--Trevor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20171103/8dfe5d5c/attachment.htm>


More information about the DBIx-Class mailing list