9 my $schema = DBICTest->init_schema();
12 my $it = $schema->resultset("CD")->search( {},
16 is( $it->count, 3, "count ok" );
17 is( $it->next->title, "Caterwaulin' Blues", "iterator->next ok" );
20 is( $it->next, undef, "next past end of resultset ok" );
23 my @cds = $schema->resultset("CD")->search( {},
28 is( $cds[0]->title, "Spoonful of bees", "offset ok" );
30 # test software-based limiting
31 $it = $schema->resultset("CD")->search( {},
36 is( $it->count, 3, "software limit count ok" );
37 is( $it->next->title, "Caterwaulin' Blues", "software iterator->next ok" );
40 is( $it->next, undef, "software next past end of resultset ok" );
42 @cds = $schema->resultset("CD")->search( {},
48 is( $cds[0]->title, "Spoonful of bees", "software offset ok" );
51 $schema->resultset("CD")->search({}, {
55 } qr/Unable to generate limited query representation with 'software_limit' enabled/;
57 @cds = $schema->resultset("CD")->search( {},
62 is( $cds[0]->title, "Spoonful of bees", "offset with no limit" );
64 $it = $schema->resultset("CD")->search(
71 -not_like => 'Forkful%'
77 is( $it->count, 1, "complex abstract count ok" );