Alzabo (version 0.92)

Doc index

TOC | Top

NAME

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

TOC | Top

SYNOPSIS

  use Alzabo::Create::ColumnDefinition;
TOC | Top

DESCRIPTION

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.

TOC | Top

INHERITS FROM

Alzabo::ColumnDefinition

Note: all relevant documentation from the superclass has been merged into this document.

TOC | Top

METHODS

new

This method takes the following parameters:

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

TOC | Top

alter

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

TOC | Top

type

Returns the object's type as a string.

TOC | Top

set_type ($string)

Sets the object's type.

Throws: Alzabo::Exception::Params, Alzabo::Exception::RDBMSRules

TOC | Top

length

Returns the length attribute of the column, or undef if there is none.

TOC | Top

precision

Returns the precision attribute of the column, or undef if there is none.

TOC | Top

set_length

This method takes the following parameters:

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::Exception::RDBMSRules

TOC | Top

owner

Returns the Alzabo::Create::Column object that owns this definitions (the column that created it).


Table of Contents

- NAME
- SYNOPSIS
- DESCRIPTION
- INHERITS FROM
- METHODS
      - new
                  - owner => Alzabo::Create::ColumnDefinition object
                  - type => $type
      - alter
      - type
      - set_type ($string)
      - length
      - precision
      - set_length
                  - length => $length
                  - precision => $precision (optional)
      - owner