Alzabo::Create::Index - Index objects for schema creation
use Alzabo::Create::Index;
Alzabo::Index
The constructor takes the following parameters:
table => Alzabo::Create::Table object
Alzabo::Create::Table
The table that this index is indexing.
columns => [ Alzabo::Create::Column object, .. ]
Alzabo::Create::Column
columns => [ { column => Alzabo::Create::Column object, prefix => $prefix }, repeat as needed ... ]
This parameter indicates which columns that are being indexed. It can either be an array reference of column objects, or an array reference of hash references, each with a key called column and one called prefix.
The prefix key is optional.
unique => $boolean
Indicates whether or not this is a unique index.
fulltext => $boolean
Indicates whether or not this is a fulltext index.
function => $string
This can be used to create a function index where supported. The value of this parameter should be the full function, with column names, such as LCASE( username ).
LCASE( username )
The "columns" parameter should include all the columns used in the function.
Returns a new Alzabo::Create::Index object.
Alzabo::Create::Index
Throws: Alzabo::Exception::Params, Alzabo::Exception::RDBMSRules
Alzabo::Exception::Params
Alzabo::Exception::RDBMSRules
Adds a column to the index.
This method takes the following parameters:
column => Alzabo::Create::Column object
prefix => $prefix (optional)
Deletes the given column from the index.
prefix => $prefix
Sets whether or not the index is a unique index.
Set whether or not the index is a fulltext index.
The column (with the new name already set).
old_name => $old_name
This method is called by the table object which owns the index when a column name changes. You should never need to call this yourself.
Throws: Alzabo::Exception::Params
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.