5 eval "use DBD::SQLite";
6 plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 10);
14 my $it = DBICTest::CD->search( {},
18 is( $it->count, 3, "count ok" );
19 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
22 is( $it->next, undef, "next past end of resultset ok" );
25 my @cds = DBICTest::CD->search( {},
30 is( $cds[0]->title, "Spoonful of bees", "offset ok" );
32 # test software-based limiting
33 $it = DBICTest::CD->search( {},
38 is( $it->count, 3, "software limit count ok" );
39 is( $it->next->title, "Caterwaulin' Blues", "software iterator->next ok" );
42 is( $it->next, undef, "software next past end of resultset ok" );
44 @cds = DBICTest::CD->search( {},
50 is( $cds[0]->title, "Spoonful of bees", "software offset ok" );
52 # based on a failing criteria submitted by waswas
53 # requires SQL::Abstract >= 1.20
54 $it = DBICTest::CD->search(
61 -not_like => 'Forkful%'
67 is( $it->count, 1, "complex abstract count ok" );