1 package DBIx::Class::Cursor;
6 use base qw/DBIx::Class/;
10 DBIx::Class::Cursor - Abstract object representing a query cursor on a
15 my $cursor = $schema->resultset('CD')->cursor();
17 # raw values off the database handle in resultset columns/select order
18 my @next_cd_column_values = $cursor->next;
20 # list of all raw values as arrayrefs
21 my @all_cds_column_values = $cursor->all;
25 A Cursor represents a query cursor on a L<DBIx::Class::ResultSet> object. It
26 allows for traversing the result set with L</next>, retrieving all results with
27 L</all> and resetting the cursor with L</reset>.
29 Usually, you would use the cursor methods built into L<DBIx::Class::ResultSet>
30 to traverse it. See L<DBIx::Class::ResultSet/next>,
31 L<DBIx::Class::ResultSet/reset> and L<DBIx::Class::ResultSet/all> for more
38 Virtual method. Returns a new L<DBIx::Class::Cursor> object.
43 die "Virtual method!";
48 Virtual method. Advances the cursor to the next row. Returns an array of
49 column values (the result of L<DBI/fetchrow_array> method).
54 die "Virtual method!";
59 Virtual method. Resets the cursor to the beginning.
64 die "Virtual method!";
69 Virtual method. Returns all rows in the L<DBIx::Class::ResultSet>.
77 while (my @row = $self->next) {
84 =head1 FURTHER QUESTIONS?
86 Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
88 =head1 COPYRIGHT AND LICENSE
90 This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
91 by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
92 redistribute it and/or modify it under the same terms as the
93 L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.