9 use DBIC::SqlMakerTest;
11 my $schema = DBICTest->init_schema();
13 eval "use DBD::SQLite";
14 plan skip_all => 'needs DBD::SQLite for testing' if $@;
17 cmp_ok($schema->resultset("Tag")->count({ tag => 'Blue' }),
18 '==', 9, 'Count without DISTINCT ok');
20 cmp_ok($schema->resultset("Tag")->count({ tag => [ 'Blue', 'Shiny' ] }, { group_by => 'tag' }),
21 '==', 2, 'Count with single column group_by ok');
23 cmp_ok($schema->resultset("Tag")->count({ tag => 'Blue' }, { group_by => [ qw/tag cd/ ]}),
24 '==', 4, 'Count with multiple column group_by ok');
26 cmp_ok($schema->resultset("Tag")->count({ tag => 'Blue' }, { distinct => 1 }),
27 '==', 4, "Count with single column distinct ok");