Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Rose::DB::Object::Iterator
Iterate over a series of Rose::DB::Objects.

Rose::DB::Object::Iterator - Iterate over a series of Rose::DB::Objects.


NAME

Rose::DB::Object::Iterator - Iterate over a series of Rose::DB::Objects.


SYNOPSIS


    $iterator = Rose::DB::Object::Manager->get_objects_iterator(...);

    while($object = $iterator->next)

    {

      # do stuff with $object...

      if(...) # bail out early

      {

        $iterator->finish;

        last;

      }

    }

    if($iterator->error)

    {

      print "There was an error: ", $iterator->error;

    }

    else

    {

      print "Total: ", $iterator->total;

    }


DESCRIPTION

the Rose::DB::Object::Iterator manpage is an iterator object that traverses a database query, returning the Rose::DB::Object manpage-derived objects for each row. the Rose::DB::Object::Iterator manpage objects are created by calls to the get_objects_iterator method of the Rose::DB::Object::Manager manpage or one of its subclasses.


OBJECT METHODS

error
Returns the text message associated with the last error, or false if there was no error.

finish
Prematurely stop the iteration (i.e., before iterating over all of the available objects).

next
Return the next the Rose::DB::Object manpage-derived object. Returns false (but defined) if there are no more objects to iterate over, or undef if there was an error.

total
Returns the total number of objects iterated over so far.


AUTHOR

John C. Siracusa (siracusa@gmail.com)


COPYRIGHT

Copyright (c) 2007 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.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy