4 eval "use DBD::SQLite";
5 plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 9);
9 my $it = DBICTest::CD->search( {},
13 is( $it->count, 3, "count ok" );
14 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
17 is( $it->next, undef, "next past end of resultset ok" );
20 my @cds = DBICTest::CD->search( {},
25 is( $cds[0]->title, "Spoonful of bees", "offset ok" );
27 # test software-based limiting
28 $it = DBICTest::CD->search( {},
33 is( $it->count, 3, "software limit count ok" );
34 is( $it->next->title, "Caterwaulin' Blues", "software iterator->next ok" );
37 is( $it->next, undef, "software next past end of resultset ok" );
39 @cds = DBICTest::CD->search( {},
45 is( $cds[0]->title, "Spoonful of bees", "software offset ok" );
47 # based on a failing criteria submitted by waswas
48 # requires SQL::Abstract >= 1.20
49 $it = DBICTest::CD->search(
56 -not_like => 'Forkful%'
62 is( $it->count, 1, "complex abstract count ok" );