From: Peter Rabbitson Date: Thu, 7 May 2009 17:28:29 +0000 (+0000) Subject: Merge 'trunk' into 'count_distinct' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=038af71cf6f6c77cb1380378d4887a7da03fe2b2;p=dbsrgits%2FDBIx-Class-Historic.git Merge 'trunk' into 'count_distinct' r6164@Thesaurus (orig r6163): ribasushi | 2009-05-07 19:09:01 +0200 r6115@Thesaurus (orig r6114): plu | 2009-05-03 10:39:16 +0200 new branch to fix $rs->update and $rs->delete using the new as_query method r6116@Thesaurus (orig r6115): plu | 2009-05-03 10:52:07 +0200 Methods update/delete on resultset use now new as_query method to updated/delete properly on joined/prefetched resultset using a subquery. Therefore some tests have been added and some have been changed as well as the warnings around $rs->update/delete have been removed. Cheers! r6117@Thesaurus (orig r6116): plu | 2009-05-03 11:13:48 +0200 Using "is" instead of "cmp_ok" r6160@Thesaurus (orig r6159): ribasushi | 2009-05-07 11:58:14 +0200 Back out skip_parens support in as_query r6161@Thesaurus (orig r6160): ribasushi | 2009-05-07 19:00:48 +0200 This test is completely borked, needs a rewrite r6162@Thesaurus (orig r6161): ribasushi | 2009-05-07 19:07:19 +0200 Temporary fix or the IN ( ( ... ) ) problem until we get proper SQLA AST (needs SQLA released with commit 6158 to work) r6165@Thesaurus (orig r6164): ribasushi | 2009-05-07 19:11:46 +0200 Changes, remove merged branch r6169@Thesaurus (orig r6168): ribasushi | 2009-05-07 19:24:54 +0200 Bump SQLA dependency so -in/-between workarounds overload properly --- 038af71cf6f6c77cb1380378d4887a7da03fe2b2 diff --cc t/resultset/as_query.t index 6865655,c496085..f849f7a --- a/t/resultset/as_query.t +++ b/t/resultset/as_query.t @@@ -65,15 -65,3 +65,13 @@@ my $rscol = $art_rs->get_column( 'charf [ [ rank => 2 ], [ name => 'Billy Joel' ] ], ); } + +TODO: { + local $TODO = 'Needs -paren fixes in SQLA before it can work'; + my $rs = $schema->resultset("CD")->search( + { 'artist.name' => 'Caterwauler McCrae' }, + { join => [qw/artist/]} + ); + my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $rs->get_column('cdid')->as_query } } ); + cmp_ok($subsel_rs->count, '==', $rs->count, 'Subselect on PK got the same row count'); +} - - __END__