NAME
SimpleDB::Class::Domain - A schematic representation of a SimpleDB domain.
VERSION
version 0.0500
DESCRIPTION
A subclass of this class is created for each domain in SimpleDB with it's name, attributes, and relationships.
METHODS
The following methods are available from this class.
new ( params )
Constructor. Normally you should never call this method yourself, instead use the domain() method in SimpleDB::Class.
params
A hash containing the parameters needed to construct this object.
simpledb
Required. A reference to a SimpleDB::Class object.
name
Required. The SimpleDB domain name associated with this class.
item_class ( )
Returns the SimpleDB::Class::Item subclass name passed into the constructor.
name ( )
Returns the name determined automatically by the item_class passed into the constructor.
simpledb ( )
Returns the SimpleDB::Class object set in the constructor.
create
Creates this domain in the SimpleDB.
delete
Deletes this domain from the SimpleDB.
find ( id )
Retrieves an item from the SimpleDB by ID and then returns a SimpleDB::Class::Item object.
id
The unique identifier (called ItemName in AWS documentation) of the item to retrieve.
insert ( attributes, [ id ] )
Adds a new item to this domain.
attributes
A hash reference of name value pairs to insert as attributes into this item.
id
Optionally specify a unqiue id for this item.
count ( [ where ] )
Returns an integer indicating how many items are in this domain.
WARNING: With this method you need to be aware that SimpleDB is eventually consistent. See "Eventual Consistency" in SimpleDB::Class for details.
where
A where clause as defined in SimpleDB::Class::SQL if you want to count only a certain number of items in the domain.
search ( where )
Returns a SimpleDB::Class::ResultSet object.
WARNING: With this method you need to be aware that SimpleDB is eventually consistent. See "Eventual Consistency" in SimpleDB::Class for details.
where
A where clause as defined by SimpleDB::Class::SQL.
LEGAL
SimpleDB::Class is Copyright 2009 Plain Black Corporation (http://www.plainblack.com/) and is licensed under the same terms as Perl itself.