Rose::DB::Object::Iterator - Iterate over a series of Rose::DB::Objects.
$iterator = Rose::DB::Object::Manager->get_objects_iterator(...);
while($object = $iterator->next)
# do stuff with $object...
if(...) # bail out early
print "There was an error: ", $iterator->error;
print "Total: ", $iterator->total;
Rose::DB::Object::Iterator is an iterator object that traverses a database query, returning Rose::DB::Object-derived objects for each row. Rose::DB::Object::Iterator objects are created by calls to the get_objects_iterator method of Rose::DB::Object::Manager or one of its subclasses.
Returns the text message associated with the last error, or false if there was no error.
Prematurely stop the iteration (i.e., before iterating over all of the available objects).
Return the next Rose::DB::Object-derived object. Returns false (but defined) if there are no more objects to iterate over, or undef if there was an error.
Returns the total number of objects iterated over so far.
John C. Siracusa (firstname.lastname@example.org)
Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Rose::DB::Object, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.