Alzabo::Create::Column - Column objects for use in schema creation
This object represents a column. It holds data specific to a column. Additional data is held in a
Alzabo::Create::ColumnDefinition object, which is used to allow two columns to share a type (which is good when two columns in different tables are related as it means that if the type of one is changed, the other is also.)
The constructor accepts the following parameters:
Defaults to false.
Defaults to false.
If "default_is_raw" is true, then it will not be quoted when passed to the DBMS in SQL statements. This should be used to allow a default which is a function, like
One of either ...
... or ...
An optional comment.
It returns a new
This method allows you to change a column's type, length, and precision as a single operation. It should be instead of calling
set_type() followed by
It takes the following parameters:
Sets the column's type.
Alzabo::Create::Table object in which this column is located.
Sets the column's name (a string).
Sets the nullability of the column (this determines whether nulls are allowed in the column or not). Must be 0 or 1.
Sets the column's attributes. These are strings describing the column (for example, valid attributes in MySQL are "PRIMARY KEY" or "AUTO_INCREMENT").
Add an attribute to the column's list of attributes.
Delete the given attribute from the column's list of attributes.
Sets the column's default value.
This method takes the following parameters:
This method sets the column's length and precision. The precision parameter is optional (though some column types may require it if the length is set).
Sets the value of the column's sequenced attribute.
Alzabo::Create::ColumnDefinition object which holds this column's type information.
If the column's name has been changed since the last time the schema was instantiated, this method returns the column's previous name.
Set the comment for the column object.