5 eval "use DBD::SQLite";
6 plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 9);
10 my $it = $schema->resultset("CD")->search( {},
14 is( $it->count, 3, "count ok" );
15 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
18 is( $it->next, undef, "next past end of resultset ok" );
21 my @cds = $schema->resultset("CD")->search( {},
26 is( $cds[0]->title, "Spoonful of bees", "offset ok" );
28 # test software-based limiting
29 $it = $schema->resultset("CD")->search( {},
34 is( $it->count, 3, "software limit count ok" );
35 is( $it->next->title, "Caterwaulin' Blues", "software iterator->next ok" );
38 is( $it->next, undef, "software next past end of resultset ok" );
40 @cds = $schema->resultset("CD")->search( {},
46 is( $cds[0]->title, "Spoonful of bees", "software offset ok" );
48 # based on a failing criteria submitted by waswas
49 # requires SQL::Abstract >= 1.20
50 $it = $schema->resultset("CD")->search(
57 -not_like => 'Forkful%'
63 is( $it->count, 1, "complex abstract count ok" );