Fey::ORM::Role::Iterator - A role for things that iterate over Fey::Object::Table objects


Fey-ORM documentation  | view source Contained in the Fey-ORM distribution.

Index


NAME

Top

Fey::ORM::Role::Iterator - A role for things that iterate over Fey::Object::Table objects

VERSION

Top

version 0.43

SYNOPSIS

Top

  package My::Iterator;

  use Moose;

  with 'Fey::ORM::Role::Iterator';

DESCRIPTION

Top

This role provides some common methods used by Fey::Object::Iterator classes, as well as defining a consistent interface for iterators.

REQUIRED METHODS

Top

Classes which consume this role must provide _get_next_result() and reset() methods.

PROVIDED ATTRIBUTES

Top

This role provides the following attributes.

$iterator->classes()

An array reference of class names. Each class must be a subclass of Fey::Object::Table.

$iterator->index()

The current iterator index. Also provides _inc_index() and _reset_index() methods.

PROVIDED METHODS

Top

This role provides the following methods. These methods are documented in Fey::Object::Iterator::FromSelect.

$iterator->next

$iterator->next_as_hash()

$iterator->all()

$iterator->all_as_hashes()

$iterator->remaining()

$iterator->remaining_as_hashes()

AUTHOR

Top

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

Top


Fey-ORM documentation  | view source Contained in the Fey-ORM distribution.