Jifty:...Column(3pm)
π Jifty::...Column π
okay bestie, gather round, because this one is literally the User Contributed Perl Documentation for Jifty::DBI::Column and it's giving "small class, big responsibilities" π
β¨ NAME β¨
Jifty::DBI::Column β encapsulates a single column in a Jifty::DBI::Record table. one column, one whole little diva, no cap π
πΈ DESCRIPTION πΈ
So this class is the glow-up for a single column inside a Jifty::DBI::Record table description. It replaces the _accessible method in Jifty::DBI::Record, which is iconic of it honestly.
It's got these accessors, and yes you're gonna memorize them: name type default validator boolean refers_to readable writable length β¨
π¦ new
(no notes, bestie, it's just new β the constructor does constructor things π«Ά)
π¦ is_numeric
Returns true if the column is some kind of numeric type, otherwise it returns false. that's it. that's the whole vibe π’
π¦ is_string
Returns true if this column is a text field π
π¦ is_boolean
Returns true if this column is a boolean β
π¦ serialize_metadata
Returns a hash describing this column object with enough detail to fully describe it in the database.
It intentionally skips:
record_class- all column attributes starting with
_ - all column attributes which are undefined
The "known" attributes in the attributes hash get flattened and returned as well. The list of known attributes is:
containerlabel hints render_asdisplay_lengthvalid_valuesavailable_valuesautocompleteddocumentationno_placeholder
π§ no_placeholder
Setting this to a true value causes load_by_cols in Jifty::DBI::record to not use a placeholder when loading the column. This can allow the database to come up with better query plans in some cases. lowkey a performance slay π
π¦ serialize_metadata2
Returns a hash describing this column object with enough detail to fully describe it in the database. (yes, the sequel π)
It intentionally skips:
record_class- all column attributes starting with
_ - all column attributes which are undefined
and that's the whole rundown, bestie.
π¦ validator
Gets/sets the validator coderef for the column. give it a coderef, get a coderef, mutual exchange, it's giving communication π«Ά
π¦ read
DEPRECATED. Use $column->readable instead. π¨ like bestie it's over, move on π¨
π¦ write
DEPRECATED. Use $column->writable instead. π¨ stop using it fr fr π¨
π¦ length
DEPRECATED. Use $column->max_length instead. π¨ she's retired, respect the retirement π¨
π¦ until
DEPRECATED. Use $column->till instead. π¨ literally just rename it in your code, i'm begging π¨
π¦ active
Returns a true value if the column method exists for the current application version. The current application version is figured out by checking the schema_version in Jifty::DBI::Record of the column's record_class.
This method returns a false value if the column has not yet been added or has been dropped.
And it also returns a false value under these circumstances:
- Both the
sincetrait andschema_versionmethod are defined, andschema_versionis less than the version set onsince. - Both the
tilltrait andschema_versionmethod are defined, andschema_versionis greater than or equal to the version set ontill.
Otherwise, this method returns true. periodt. π
π vibe check complete: every option, every deprecated warning, every known attribute β all accounted for. nothing dropped, nothing invented, we ate and left no crumbs π
and that's a wrap bestie!! this page is from perl v5.34.0, dated 2022-06-15, and it ships as part of the Jifty:...Column(3pm) manual β mwah, go forth and query responsibly ππΈ
π¦ where this page comes from
- debian bookworm: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libjifty-dbi-perl 0.78-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libjifty-dbi-perl 0.78-3 Β· 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