Alzabo::Column(3pm)
β¨ NAME β¨
Alzabo::Column β the lil object that is a column π
πΈ SYNOPSIS πΈ
use Alzabo::Column;
foreach my $c ($table->columns)
{
print $c->name;
}
π¦ DESCRIPTION π¦
okay so bestie, this object represents a column. that's it, that's the vibe. it holds all the data that's specific to one single column β its name, its type, whether it takes NULLs, all of it. one column, one object, very main character π
π METHODS π
π table
returns the table object that this column belongs to. like, who's your parent? that one. π«Ά
π name
returns the column's name, as a string. iconic.
π nullable
returns a boolean value telling you whether or not NULLs are allowed in this column. yes/no, slay/not slay.
π attributes
a column's attributes are strings describing the column β for example, valid attributes in MySQL are UNSIGNED or ZEROFILL.
this method returns a list of strings of such strings. a list! of strings! πβ¨
π has_attribute
this method can be used to test whether or not a column has a particular attribute. by default, the check is case-insensitive.
it takes the following parameters:
attribute => $attributecase_sensitive => 0 or 1(defaults to0)
it returns a boolean value indicating whether or not the column has this particular attribute. vibe check complete π
π type
returns the column's type, as a string.
π sequenced
the meaning of a sequenced column varies from one RDBMS to another. in those with sequences, it means that a sequence is created and that values for this column will be drawn from it for inserts into this table. in databases without sequences, the nearest analog for a sequence is used β in MySQL the column is given the AUTO_INCREMENT attribute, in Sybase the identity attribute.
in general, this only has meaning for the primary key column of a table with a single column primary key. setting the column as sequenced means its value never has to be provided to when calling "Alzabo::Runtime::Table->insert".
returns a boolean value indicating whether or not this column is sequenced. π’
π default
returns the default value of the column as a string, or undef if there is no default.
π default_is_raw
returns true if the default is intended to be provided to the DBMS as-is, without quoting β for example "NOW()" or "current_timestamp". raw and unfiltered, no quotation marks holding it back fr fr π₯
π length
returns the length attribute of the column, or undef if there is none.
π precision
returns the precision attribute of the column, or undef if there is none.
π is_primary_key
returns a boolean value indicating whether or not this column is part of its table's primary key. π
π is_numeric
returns a boolean value indicating whether the column is a numeric type column.
π is_integer
returns a boolean value indicating whether the column is a numeric type column.
π is_floating_point
returns a boolean value indicating whether the column is a numeric type column.
bestie i KNOW these three descriptions look identical, that's genuinely how the page has them written, i'm not messing with you π the method names are the whole point here.
π is_character
returns a boolean value indicating whether the column is a character type column.
this is true only for any columns which are defined to hold text data, regardless of size. tiny text? huge text? both characters. periodt π
π is_date
returns a boolean value indicating whether the column is a date type column.
π is_datetime
returns a boolean value indicating whether the column is a datetime type column.
π is_time
returns a boolean value indicating whether the column is a time type column.
π is_time_interval
returns a boolean value indicating whether the column is a time interval type column.
π is_blob
returns a boolean value indicating whether the column is a blob column.
this is true for any columns defined to hold binary data, regardless of size. blobs are blobs, no size discrimination here π«Ά
π generic_type
this methods returns one of the following strings:
integer
floating_point
character
date
datetime
time
blob
unknown
one of those, that's the whole list, no extras, no swaps π
π definition
the definition object is very rarely of interest. use the "type()" method if you are only interested in the column's type.
this methods returns the "Alzabo::ColumnDefinition" object which holds this column's type information. it's the whole deep lore, only open it if you truly need it π
π comment
returns the comment associated with the column object, if any. lil note to self energy π
π AUTHOR π
Dave Rolsky, <autarch@urth.org>
and that's the whole page bestie, no cap β this was perl v5.34.0, dated 2022-06-14, and it lives its life as Alzabo::Column(3pm) π¦π go forth and inspect your columns β¨
π¦ where this page comes from
- debian bookworm: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms