X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F73oracle.t;h=6220ec9422fa461a456f101a54f05992be6b0534;hb=11d68671189252ea241d119283f75d074cd4457c;hp=51cc932282e6aaaa39b1f1810d0fcda9b772877b;hpb=d2f21b377c36ca386492605c7b2c571eed09c0f6;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/73oracle.t b/t/73oracle.t index 51cc932..6220ec9 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -106,15 +106,32 @@ is($tjoin->next->title, 'Track1', "ambiguous column ok"); # check count distinct with multiple columns my $other_track = $schema->resultset('Track')->create({ trackid => 2, cd => 1, position => 1, title => 'Track2' }); + my $tcount = $schema->resultset('Track')->search( - {}, - { - select => [{count => {distinct => ['position', 'title']}}], - as => ['count'] - } - ); + {}, + { + select => [ qw/position title/ ], + distinct => 1, + } +); +is($tcount->count, 13, 'multiple column COUNT DISTINCT ok'); + +$tcount = $schema->resultset('Track')->search( + {}, + { + columns => [ qw/position title/ ], + distinct => 1, + } +); +is($tcount->count, 13, 'multiple column COUNT DISTINCT ok'); -is($tcount->next->get_column('count'), 2, "multiple column select distinct ok"); +$tcount = $schema->resultset('Track')->search( + {}, + { + group_by => [ qw/position title/ ] + } +); +is($tcount->count, 13, 'multiple column COUNT DISTINCT using column syntax ok'); # test LIMIT support for (1..6) {