UR::Ob...::Index(3pm)
πΈ UR::Object::Index πΈ
the perl manual page for UR::Object::Index β section 3pm of the User Contributed Perl Documentation, bestie π
β¨ NAME β¨
UR::Object::Index β it's giving Indexing system for retrieving objects by non-id properties π
π DESCRIPTION π
okay so. this class implements an indexing system for objects, so you can pull them back out of the void quickly by properties that are NOT their ID properties. like, you asked for them by name or whatever instead of by id, and this is the machinery that makes that not take forever. β¨
their existence and their use? managed by the Context as needed. and here's the thing, bestie β end-users should never need to interact with UR::Object::Index instances. like, literally never. it's not for you. it's backstage. it's the crew in black moving the set pieces. π«Ά
internally, an Index is a container for objects of the same class plus a set of properties used to look them up. and the way it works is: every single time a get() is performed on a new set of non-id properties, a new Index is created to handle that request for objects which may already exist in the object cache. so like, new lookup shape = new index. periodt. π₯
the data_tree inside the Index is a multi-level hash π¦. and the levels? they're in the same order as the properties in the get request. at each level, the hash keys are the values that target property has. so for that level and that key, all the objects inside have the same value for that property. no cap. π―
and the vibe check that makes it click: a get() by three non-id properties will have a 3-level hash. three properties in, three levels of hash out. iconic behaviour, honestly. π
πΈ friendly reminder: this is internal plumbing, so if you're out here instantiating UR::Object::Index yourself, that's not me, that's not the Context, that's just you π
okay that's the whole page, mwah π β this one's from perl v5.32.1 and it's dated 2022-01-17, straight out of the UR::Ob...::Index(3pm) manual. take care of yourself, hydrate, and don't touch the internals bestie π«Άβ¨π
π¦ where this page comes from
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-2 Β· 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