Take me over?
SYNOPSIS
my $set = Fey::NamedObjectSet->new( $name_col, $size_col );
DESCRIPTION
This class represents a set of named objects, such as tables or columns. You can look up objects in the set by name, or simply retrieve all of the objects at once.
It exists to simplify Fey's internals, since named sets of objects are quite common in SQL.
METHODS
This class provides the following methods:
Fey::NamedObjectSet->new(@objects)
This method returns a new Fey::NamedObjectSet
object. Any objects passed to this method are added to the set as it is created. Each object passed must implement a name()
method, which is expected to return a unique name for that object.
$set->add(@objects)
Adds one or more named objects to the set.
$set->delete(@objects)
This method accepts one or more objects and removes them from the set, if they are part of it.
$set->object($name)
Given a name, this method returns the corresponding object.
$set->objects(@names)
When given a list of names as an argument, this method returns the named objects in the order specified, if they exist in the set. If not given any arguments it returns all of the objects in the set.
$set->is_same_as($other_set)
Given a Fey::NamedObjectSet
, this method indicates whether or not the two sets are the same.
BUGS
See Fey for details on how to report bugs.