Alzabo...:Column(3pm)
π Alzabo::Runtime::Column β the glow-up guide π
okay bestie, welcome to the Alzabo::Runtime::Column page from the User Contributed Perl Documentation, aka the little manual that tells you everything about column objects. it's giving backstage pass to your database's cutest building block. let's get into it β¨
β¨ NAME β¨
Alzabo::Runtime::Column β column objects, periodt π
πΈ SYNOPSIS πΈ
use Alzabo::Runtime::Column;
that's it, that's the whole vibe check π«Ά
π¦ DESCRIPTION π¦
so this object is a column. like, it represents one. it holds all the data that's specific to a single column, no cap. it's the main character of one tiny slice of your table π
π INHERITS FROM π
Alzabo::Column
heads up bestie: every single piece of relevant documentation from the superclass has been merged straight into this document. so you don't gotta go anywhere else, it's all here π
π METHODS π
π table
returns the table object that this column belongs to. its home, its origin story, its whole situation π
π name
returns the column's name, as a string. yes, the actual name. iconic of it β¨
π nullable
returns a boolean value telling you whether or not NULLs are allowed in this column. lowkey important, ngl π
π attributes
a column's attributes are strings that describe the column β for example, the valid attributes in MySQL are 'UNSIGNED' or 'ZEROFILL'.
this method returns a list of strings of such strings. a list of strings of strings?? yes. that's the whole thing π
π has_attribute
you can use this one to test whether or not a column has one particular attribute. by default, the check is case-insensitive (chill of it, honestly).
it takes these parameters:
attribute => $attributecase_sensitive => 0 or 1(defaults to0)
and it returns a boolean value telling you whether or not the column has that particular attribute π«Ά
π type
returns the column's type as a string. slay π
π sequenced
okay so the meaning of a sequenced column varies from one RDBMS to another. in the ones that have sequences, it means a sequence gets created and 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 instead β in MySQL the column gets the AUTO_INCREMENT attribute, and in Sybase it gets 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 when you call Alzabo::Runtime::Table->insert. you just... don't gotta. the universe handles it πΈ
returns a boolean value telling you 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. no default, no problem π¦
π 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, unfiltered, exactly how the DBMS wants it π
π 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 telling you whether or not this column is part of its table's primary key. main character column behavior π
π 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 π’
π 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. size doesn't matter here bestie, text is text π
π 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. again β size is not the moment, binary-ness is π
π generic_type
this method returns one of the following strings:
integerfloating_pointcharacterdatedatetimetimeblobunknown
pick your fighter, the column already picked for you π«
π definition
the definition object is very rarely of interest. use the type() method if you're only interested in the column's type. genuinely, bestie, type() is the one you want 99% of the time π
this method returns the Alzabo::Runtime::ColumnDefinition object which holds this column's type information.
π comment
returns the comment associated with the column object, if any. if there isn't one, well, there isn't one π
π alias
takes the following parameters:
as => $name
this method returns an object that you can use in calls to the table and schema select() methods, in order to change the name given to the column if next_as_hash() is called on the Alzabo::DriverStatement returned by the aforementioned select() method. rename her, she's serving a whole new identity β¨
π AUTHOR π
Dave Rolsky, <autarch@urth.org> π«Ά
and that's the page, bestie!! this was perl v5.34.0, dated 2022-06-14, straight from Alzabo...:Column(3pm) β go forth and query, you absolute icon π πβ¨
π¦ 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