The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

SimpleDB::Class::ResultSet - An iterator of items from a domain.

VERSION

version 0.0100

DESCRIPTION

This class is an iterator to walk to the items passed back from a query.

METHODS

The following methods are available from this class.

new ( params )

Constructor.

params

A hash.

domain

Required. A SimpleDB::Class::Domain object.

result

A result as returned from the send_request() method from SimpleDB::Class. Either this or a where is required.

where

A where clause as defined in SimpleDB::Class::SQL. Either this or a result is required.

where ( )

Returns the where passed into the constructor.

domain ( )

Returns the domain passed into the constructor.

result ( )

Returns the result passed into the constructor, or the one generated by fetch_result() if a where is passed into the constructor.

has_result ()

A boolean indicating whether a result was passed into the constructor, or generated by fetch_result().

iterator ( )

Returns an integer which represents the current position in the result set as traversed by next().

fetch_result ( )

Fetches a result, based on a where clause passed into a constructor, and then makes it accessible via the result() method.

next ()

Returns the next result in the result set. Also fetches th next partial result set if there's a next token in the first result set and you've iterated through the first partial set.

handle_item ( id , attributes )

Converts the attributes section of an item in a result set into a SimpleDB::Class::Item object.

AUTHOR

JT Smith <jt_at_plainblack_com>

I have to give credit where credit is due: SimpleDB::Class is heavily inspired by DBIx::Class by Matt Trout (and others), and the Amazon::SimpleDB class distributed by Amazon itself (not to be confused with Amazon::SimpleDB written by Timothy Appnel).

LEGAL

SimpleDB::Class is Copyright 2009 Plain Black Corporation and is licensed under the same terms as Perl itself.