The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Alzabo::Create::ForeignKey - Foreign key objects for schema creation.

SYNOPSIS

  use Alzabo::Create::ForeignKey;

DESCRIPTION

Holds information on one table's relationship to another. It knows what columns the relationship belongs to and what the cardinality of the relationship is.

METHODS

  • new

    Takes the following parameters:

  • -- table_from => Alzabo::Create::Table object

  • -- table_to => Alzabo::Create::Table object

  • -- column_from => Alzabo::Create::Column object

  • -- column_to => Alzabo::Create::Column object

  • -- min_max_from => see below

  • -- min_max_to => see below

    The two min_max attributes both take the same kind of argument, an array reference two scalars long.

    The first of these scalars can be the value '0' or '1' while the second can be '1' or 'n'.

    Returns a new Alzabo::Create::ForeignKey object.

    Exceptions:

     AlzaboException - invalid min_max values
  • set_table_from (Alzabo::Create::Table object)

    Set the table that the relation is from.

  • set_table_to (Alzabo::Create::Table object)

    Set the table that the relation is to.

  • set_column_from (Alzabo::Create::Column object)

    Set the column that the relation is from.

  • set_column_to (Alzabo::Create::Column object)

    Set the column that the relation is to.

  • set_min_max_from (\@min_max_value) see above for details

    Sets the min_max value of the relation of the 'from' table to the 'to' table.

    Exceptions:

     AlzaboException - invalid min_max values
  • set_min_max_to (\@min_max_value) see above for details

    Sets the min_max value of the relation of the 'to' table to the 'from' table.

    Exceptions:

     AlzaboException - invalid min_max values

AUTHOR

Dave Rolsky, <autarch@urth.org>

SEE ALSO

See the Alzabo::ForeignKey documentation for more details on how relationships are defined in Alzabo.

6 POD Errors

The following errors were encountered while parsing the POD:

Around line 127:

Expected '=item *'

Around line 129:

Expected '=item *'

Around line 131:

Expected '=item *'

Around line 133:

Expected '=item *'

Around line 135:

Expected '=item *'

Around line 137:

Expected '=item *'