Alzabo::Create::ColumnDefinition - Column definition object for schema


Alzabo documentation  | view source Contained in the Alzabo distribution.

Index


NAME

Top

Alzabo::Create::ColumnDefinition - Column definition object for schema creation

SYNOPSIS

Top

  use Alzabo::Create::ColumnDefinition;

DESCRIPTION

Top

This object holds information on a column that might need to be shared with another column. The reason this class exists is that if a column is a key in two or more tables, then some of the information related to that column should change automatically in multiple places whenever it changes at all. Right now this is only type ('VARCHAR', 'NUMBER', etc) and length/precision information. This object also has an 'owner', which is the column which created it.

INHERITS FROM

Top

Alzabo::ColumnDefinition

METHODS

Top

new

This method takes the following parameters:

* owner => Alzabo::Create::ColumnDefinition object
* type => $type

It returns a new Alzabo::Create::ColumnDefinition object.

alter

See the Alzabo::Column->alter()|Alzabo::Column/alter method for details.

set_type ($string)

Sets the object's type.

Throws: Alzabo::Exception::Params|Alzabo::Exceptions, Alzabo::Exception::RDBMSRules|Alzabo::Exceptions

set_length

This method takes the following parameters:

* length => $length
* precision => $precision (optional)

Sets the column's length and precision. The precision parameter is optional (though some column types may require it if the length is set).

Throws: Alzabo::Exception::Params|Alzabo::Exceptions, Alzabo::Exception::RDBMSRules|Alzabo::Exceptions


Alzabo documentation  | view source Contained in the Alzabo distribution.