Alzabo::Runtime::RowCursor - Cursor that returns C objects


NAME

Alzabo::Runtime::RowCursor - Cursor that returns Alzabo::Runtime::Row objects


SYNOPSIS

  use Alzabo::Runtime::RowCursor;
  my $cursor = $schema->table('foo')->all_rows;
  while ( my $row = $cursor->next_row )
  {
      print $row->select('foo'), "\n";
  }


DESCRIPTION

Objects in this class are used to return Alzabo::Runtime::Row objects when requested. The cursor does not preload objects but rather creates them on demand, which is much more efficient. For more details on the rational please see the RATIONALE FOR CURSORS section in Alzabo::Runtime::Cursor.


INHERITS FROM

Alzabo::Runtime::Cursor


METHODS

new

Parameters

next_row

Returns the next Alzabo::Runtime::Row object or undef if no more are available. This behavior can mask errors in your database's referential integrity. For more information on how to deal with this see the HANDLING ERRORS section in Alzabo::Runtime::Cursor.

all_rows

Returns all the rows available from the current point onwards. This means that if there are five rows that will be returned when the object is created and you call next_row twice, calling all_rows after it will only return three. Calling the errors method after this will return all errors trapped during the fetching of these rows.

errors

See Alzabo::Runtime::Cursor.

reset

Resets the cursor so that the next next_row call will return the first row of the set.


AUTHOR

Dave Rolsky, <autarch@urth.org>

 Alzabo::Runtime::RowCursor - Cursor that returns C objects