8 my $schema = DBICTest->init_schema();
11 my $it = $schema->resultset("CD")->search( {},
15 is( $it->count, 3, "count ok" );
16 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
19 is( $it->next, undef, "next past end of resultset ok" );
22 my @cds = $schema->resultset("CD")->search( {},
27 is( $cds[0]->title, "Spoonful of bees", "offset ok" );
29 # test software-based limiting
30 $it = $schema->resultset("CD")->search( {},
35 is( $it->count, 3, "software limit count ok" );
36 is( $it->next->title, "Caterwaulin' Blues", "software iterator->next ok" );
39 is( $it->next, undef, "software next past end of resultset ok" );
41 @cds = $schema->resultset("CD")->search( {},
47 is( $cds[0]->title, "Spoonful of bees", "software offset ok" );
50 @cds = $schema->resultset("CD")->search( {},
55 is( $cds[0]->title, "Spoonful of bees", "offset with no limit" );
58 # based on a failing criteria submitted by waswas
59 # requires SQL::Abstract >= 1.20
60 $it = $schema->resultset("CD")->search(
67 -not_like => 'Forkful%'
73 is( $it->count, 1, "complex abstract count ok" );