projects
/
dbsrgits/DBIx-Class-Historic.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Since .generated_pod is no longer shipped in-dist, move it to maint/
[dbsrgits/DBIx-Class-Historic.git]
/
t
/
search
/
distinct.t
1
use strict;
2
use warnings;
3
4
use Test::More;
5
6
use lib qw(t/lib);
7
use DBIC::SqlMakerTest;
8
use DBICTest;
9
10
my $schema = DBICTest->init_schema();
11
12
# make sure order + distinct do not double-inject group criteria
13
my $year_rs = $schema->resultset ('CD')->search ({}, {
14
distinct => 1,
15
columns => [qw/year/],
16
order_by => 'year',
17
});
18
19
is_same_sql_bind (
20
$year_rs->as_query,
21
'(
22
SELECT me.year
23
FROM cd me
24
GROUP BY me.year
25
ORDER BY year
26
)',
27
[],
28
'Correct GROUP BY',
29
);
30
31
done_testing;