Alzabo...:Index(3pm)

πŸ“¦
version 0.92 Β· 2 versions
  • 0.92 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.92 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Alzabo::Runtime::Index β€” Index objects πŸ’–

okay bestie, welcome to the Alzabo::Runtime::Index page from the User Contributed Perl Documentation ✨ this is literally the manual page for Alzabo...:Index(3pm) and we are gonna get into it 🫢


✨ SYNOPSIS ✨

use Alzabo::Runtime::Index;

like, that's it, that's the whole vibe check 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

So this object? It represents an index on a table. Periodt. πŸ’…

Indexes are made of columns plus optional prefixes for each column. And the prefix is basically telling you how many characters of the column should actually be indexed β€” like the first X chars, okay? πŸ‘‘

Now, not every RDBMS even has the concept of index prefixes, so lowkey don't assume. And also β€” not all column types are likely to allow prefixes, though fr fr this depends on the RDBMS. It's giving "it depends" 😭

Oh and the order of the columns is significant. Do not play with the order. The order matters, okay? 🌈


🌟 INHERITS FROM 🌟

Alzabo::Index

Note: all relevant documentation from the superclass has been merged into this document. So like, you don't gotta go anywhere else, bestie, it's all here πŸ’–

πŸ’… METHODS πŸ’…

columns

Returns an ordered list of the Alzabo::Runtime::Column objects that are being indexed. In order. Because order matters. We said that already but we're saying it again ✨

prefix (Alzabo::Runtime::Column object)

okay so a column prefix is, to the best of my knowledge, a MySQL specific concept β€” like that's the tea, that's what it is πŸ™ˆ and because of that it cannot be set when you're using an RDBMSRules module for a different RDBMS. So if you're not on MySQL, this feature is not your moment.

BUT. It is important enough for MySQL to have the functionality be present, so here we are. What it does: it lets you specify that the index should only look at a certain portion of a field β€” specifically the first N characters. And this prefix is required to index any sort of BLOB column in MySQL. Required. Not optional. No cap. πŸ”₯

This method returns the prefix for the column in the index. And if there is no prefix for this column in the index, then it returns undef. Simple as πŸ’œ

unique

Returns a boolean value indicating whether the index is a unique index. yes or no, iconic behavior πŸ‘‘

fulltext

Returns a boolean value indicating whether the index is a fulltext index. also yes or no πŸŽ€

function

For function indexes, this returns the function being indexed. it's giving very specific energy 🧚

id

The id is generated from the table, column and prefix information for the index. Which is super useful, because it works as a canonical name for a hash key, for example β€” iykyk 😌

Returns a string that is the id which uniquely identifies the index in this schema. One string, one index, no duplicates, we love that for us ⭐

table

Returns the Alzabo::Runtime::Table object to which the index belongs. Find your table, bestie, it's right there πŸ“


🌸 AUTHOR 🌸

Dave Rolsky, <autarch@urth.org>


and that's the whole page, we ate and left no crumbs πŸ’– this was Alzabo...:Index(3pm) from the User Contributed Perl Documentation, brought to you by perl v5.34.0, dated 2022-06-14 β€” mwah, bye bestie, go index something responsibly βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from