Alzabo::Table - Table objects
use Alzabo::Table; my $t = $schema->table('foo'); foreach $pk ($t->primary_keys) { print $pk->name; }
Objects in this class represent tables. They contain foreign key, index, and column objects.
schema
Returns the schema object that this table belong to.
name
Returns the name of the table.
column ($name)
Returns an Alzabo::Column object that matches the name given.
columns
Returns all column objects for the table.
primary_key
Returns a list of column objects that make up the primary key for the table.
column_is_primary_key (Alzabo::Column object)
Returns a boolean value indicating whether or not the column given is part of the table's primary key.
foreign_keys
Takes the following parameters:
-- column => Alzabo::Column object
-- table => Alzabo::Table object
Returns a list of foreign key objects from the given column to the given table, if they exist. In scalar context, returns the first item in the list. There is no guarantee as to what the first item will be.
Exceptions:
AlzaboException - Column doesn't exist in table AlzaboException - No foreign keys to the given table exist. AlzaboException - The given column is not a foreign key to the given table.
foreign_keys_by_table (Alzabo::Table object)
Returns a list of all the foreign key objects to the given table. In scalar context, returns the first item in the list. There is no guarantee as to what the first item will be.
foreign_keys_by_column (Alzabo::Column object)
Returns a list of all the foreign key objects that the given column is a part of, if there are any. In scalar context, returns the first item in the list. There is no guarantee as to what the first item will be.
AlzaboException - Column doesn't exist in table
all_foreign_keys
Returns a list of all the foreign key objects for this table. In scalar context, returns the first item in the list. There is no guarantee as to what the first item will be.
index ($index_id)
Given an index id (as returned from the Alzabo::Index id method), returns the index matching this id, if it exists in the table.
id
AlzaboException - Index doesn't exist in table
indexes
Returns all index objects for the table.
Dave Rolsky, <autarch@urth.org>
2 POD Errors
The following errors were encountered while parsing the POD:
Expected '=item *'
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.