Fey::FK - Represents a foreign key
my $fk = Fey::FK->new( source => $user_id_from_user_table, target => $user_id_from_department_table, );
This class represents a foreign key, connecting one or more columns in one table to columns in another table.
This class provides the following methods:
This method constructs a new Fey::FK object. It takes the following parameters:
Fey::FK
source - required
target - required
These parameters must be either a single Fey::Column object or an array reference containing one or more column objects.
Fey::Column
The number of columns for the source and target must be the same.
Returns the appropriate Fey::Table object.
Fey::Table
Returns the appropriate list of Fey::Column objects as an array reference.
Returns a list of array references. Each reference contains two Fey::Column objects, one from the source table and one from the target.
This method returns true if the foreign key includes both of the specified tables. The talbles can be specified by name or as Fey::Table objects.
Given a Fey::Column object, this method returns true if the foreign key includes the specified column.
This returns true if the the source and target tables for the foreign key are the same table.
Dave Rolsky, <autarch@urth.org>
See Fey for details on how to report bugs.
Copyright 2006-2008 Dave Rolsky, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Fey, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fey
CPAN shell
perl -MCPAN -e shell install Fey
For more information on module installation, please visit the detailed CPAN module installation guide.