Alzabo::Create::ForeignKey - Foreign key objects for schema creation.
use Alzabo::Create::ForeignKey;
Alzabo::ForeignKey
The constructor takes the following parameters:
columns_from => Alzabo::Create::Column object(s)
Alzabo::Create::Column
columns_to => Alzabo::Create::Column object(s)
These two parameters may be either a single column or a reference to an array columns. The number of columns in the two parameters must match.
cardinality => [1, 1], [1, 'n'], or ['n', 1]
from_is_dependent => $boolean
to_is_dependent => $boolean
comment => $comment
An optional comment.
It returns a new Alzabo::Create::ForeignKey object.
Alzabo::Create::ForeignKey
Throws: Alzabo::Exception::Params
Alzabo::Exception::Params
Sets the column(s) that the relation is from. This can be either a single column object or a reference to an array of column objects.
Sets the column(s) that the relation is to. This can be either a single column object or a reference to an array of column objects.
Sets the cardinality of the foreign key.
Indicates whether or not the first table in the foreign key is dependent on the other (i.e. whether the 'from' table is dependent on the 'to' table).
Indicates whether or not the second table in the foreign key is dependent on the other (i.e. whether the 'to' table is dependent on the 'from' table).
Sets the comment for the foreign key object.
Dave Rolsky, <autarch@urth.org>
To install Alzabo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alzabo
CPAN shell
perl -MCPAN -e shell install Alzabo
For more information on module installation, please visit the detailed CPAN module installation guide.