Alzabo::Create::Table - Table objects for schema creation
use Alzabo::Create::Table;
This class represents tables in the schema. It contains column, index, and foreign key objects.
Alzabo::Table
schema => Alzabo::Create::Schema object
Alzabo::Create::Schema
The schema to which this table belongs.
name => $name
comment => $comment
An optional comment.
A new Alzabo::Create::Table object.
Alzabo::Create::Table
Alzabo::Exception::Params
Changes the name of the table.
Creates a new Alzabo::Create::Column object and adds it to the table. This object is the function's return value.
Alzabo::Create::Column
In addition, if the before or after parameter is given, the move_column method is called to move the new column.
move_column
This method takes all of the same parameters as the Alzabo::Create::Column method except the table parameter, which is automatically added.
table
primary_key => 0 or 1
If this value is true, then the add_primary_key method will be called after this new column is made in order to make a it a primary key for the table.
add_primary_key
after => Alzabo::Create::Column object
... or ...
before => Alzabo::Create::Column object
A new Alzabo::Create::Column object.
Adds a column to the table. If a before or after parameter is given then the move_column method will be called to move the new column to the appropriate position.
column => Alzabo::Create::Column object
after => Alzabo::Create::Column object (optional)
before => Alzabo::Create::Column object (optional)
Deletes a column from the table.
The column to move.
and either ...
Move the column before this column
Move the column after this column.
Make the given column part of the table's primary key. The primary key is an ordered list of columns. The given column will be added to the end of this list.
Delete the given column from the primary key.
Takes the same parameters as the Alzabo::Create::ForeignKey->new method except for the table parameter, which is automatically added. The foreign key object that is created is then added to the table.
Alzabo::Create::ForeignKey->new
A new Alzabo::Create::ForeignKey object.
Alzabo::Create::ForeignKey
Adds the given foreign key to the table.
Deletes the given foreign key from the table
Takes the same parameters as the Alzabo::Create::Index->new method except for the table parameter, which is automatically added. The index object that is created is then added to the table.
Alzabo::Create::Index->new
A new Alzabo::Create::Index object.
Alzabo::Create::Index
Adds the given index to the table.
Deletes an index from the table.
Set the comment for the table 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.