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

2017-11-07 Thread James Gilbert
Indeed. I've never used a right or full join. Only ever an inner or left.

James


> On 7 Nov 2017, at 19:28, Trevor Leffler  wrote:
> 
> Well… nevermind this. A little searching reminding me that I can replace 
> right join queries with left join queries (and vice versa). I’ve replaced my 
> handful of right join queries and have things working.
>  
> Cheers, --Trevor



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

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

2017-11-07 Thread Trevor Leffler
Well... nevermind this. A little searching reminding me that I can replace 
right join queries with left join queries (and vice versa). I've replaced my 
handful of right join queries and have things working.

Cheers, --Trevor

From: dbix-class-boun...@lists.scsys.co.uk 
[mailto:dbix-class-boun...@lists.scsys.co.uk] On Behalf Of Trevor Leffler
Sent: Friday, November 3, 2017 12:56 PM
To: dbix-class@lists.scsys.co.uk
Subject: [Dbix-class] How to deal with right joins while under test/sqlite

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
___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

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

2017-11-07 Thread Trevor Leffler
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
___
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk