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

NAME

Alzabo::Create::Index - Index objects for schema creation

SYNOPSIS

  use Alzabo::Create::Index;

INHERITS FROM

Alzabo::Index

METHODS

new

Parameters

  • table => Alzabo::Create::Table object

    The table that this index is indexing.

  • columns => [ { column => Alzabo::Create::Column object, prefix => $prefix }, repeat as needed ... ]

    This is a list of columns that are being indexes. The prefix part of the hashref is optional.

  • unique => $boolean

    Indicates whether or not this is a unique index.

Returns

A new Alzabo::Create::Index object.

add_column

Add a column to the index.

Parameters

  • column => Alzabo::Create::Column object

  • prefix => $prefix (optional)

delete_column (Alzabo::Create::Column object)

Delete the given column from the index.

set_prefix

Parameters

  • column => Alzabo::Create::Column object

  • prefix => $prefix

set_unique ($boolean)

Set whether or not the index is a unique index.

register_column_name_change

Parameters

  • column => Alzabo::Create::Column object

    The column (with the new name already set).

  • old_name => $old_name

Called by the owning table object when a column changes. You should never need to call this yourself.

AUTHOR

Dave Rolsky, <autarch@urth.org>