DBIx::Class::PK(3)

πŸ’– DBIx::Class::PK β€” Primary Key class πŸ’–

okay bestie, welcome to the DBIx::Class::PK(3) page from the User Contributed Perl Documentation β€” yes, the manual name is right there, folded in like a little name tag. This is the Primary Key class, and it's lowkey important, so let's go. ✨


🌸 SYNOPSIS 🌸

This section is literally empty in the original β€” no code, no text, no nothing. We're moving on, bestie. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this class contains methods for handling primary keys and methods depending on them. That's the whole vibe. Primary keys are the main character here, periodt. πŸ‘‘


✨ METHODS ✨

πŸ†” id πŸ†”

Returns the primary key(s) for a row. Can't be called as a class method β€” like, no, bestie, it's not that kind of method. πŸ™…β€β™€οΈ

πŸ”₯ ID πŸ”₯

Returns a unique id string identifying a result object by primary key.

It's used by DBIx::Class::CDBICompat::LiveObjectIndex and DBIx::Class::ObjectCache. iykyk. πŸ’…

WARNING ⚠️ the default _create_ID method used by this function orders the returned values by the alphabetical order of the primary column names, unlike the id method, which follows the same order in which columns were fed to set_primary_key in DBIx::Class::ResultSource. So yeah, the ordering is not the same β€” do not get it twisted. 😭

🌈 ident_condition 🌈

Produces a condition hash to locate a row based on the primary key(s). Cute, useful, iconic.

my $cond = $result_source->ident_condition();

my $cond = $result_source->ident_condition('alias');

❓ FURTHER QUESTIONS? ❓

Check the list of additional DBIC resources. That's the whole assignment, bestie. 🫢


This module is free software copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library. Slay, legally. πŸ’–


okay bestie, page over! πŸ’– this was DBIx::Class::PK(3) β€” perl v5.42.0, dated 2025-01-22. mwah 🫢

πŸ“¦ where this page comes from