KiokuDB::Entry(3pm)

πŸ“¦
version 0.57 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– KiokuDB::Entry β€” the whole vibe πŸ’–

okay so bestie, welcome to KiokuDB::Entry, a page straight out of the User Contributed Perl Documentation corner of the internet. it's the entry in the database. that's the whole thing. it's giving "one little record, but make it meta." πŸŽ€

✨ VERSION ✨

we're on version 0.57, no cap. πŸ¦‹

🌸 SYNOPSIS 🌸

look at her. she's literally just this:

KiokuDB::Entry->new(
    id => ...,
    data => ...
);

see how it's not scary?? i told you it wasn't scary. 🫢

πŸ’… DESCRIPTION πŸ’…

so like, this object is the meta data for a single storage entry. one entry, one object full of gossip about it. that's the job. periodt. ✨


πŸ‘‘ ATTRIBUTES πŸ‘‘

here's where it gets juicy. every single one of these matters, so don't skip, i'm watching. πŸ‘€

  • id β€” the UUID for the entry. that's her government name.
if there is no ID then the entry is intrinsic. yes, that's the actual technical term, i'm not being cute, well i am, but it's also the term. πŸ’€
  • root β€” whether or not this is a member of the root set. being in the root set means it is not subject to garbage collection, because storage was explicitly requested. she's protected, she's got security, she's not getting swept up. πŸ‘‘
  • data β€” a simplified data structure modeling this object/reference. and listen: this is a tree, not a graph, and it has no shared data. it's JSON compliant, so behave. all references are symbolic, using a KiokuDB::Reference object with UIDs as the address space. tree not graph. say it back. 🌳
  • class β€” if the entry is blessed, this contains the class of that object. blessed object gets a class label, iconic behavior.
in the future this might be a complex structure for anonymous classes, e.g. the class and the runtime roles. future plans, don't come for me. πŸ™ˆ
  • class_meta β€” optional information such as runtime roles to be applied to the object is stored in this hashref. optional! she's flexible! πŸ’…
  • tied β€” one of "HASH", "ARRAY", "SCALAR" or "GLOB". pick your fighter.
data is assumed to be a reference or an intrinsic entry for the object driving the tied structure (e.g. the tied(%hash)). πŸŽ€
  • prev β€” contains a link to a KiokuDB::Entry objects that precedes this one. (yes, that's the original wording, we keep it, we don't fix it, we love her as she is. πŸ’œ)
the last entry that was loaded from the store, or successfully written to the store for a given UUID is kept in the live object set. the collapser creates transient Entry objects, which if written to the store successfully replace the previous one. so it's a glow-up chain. the new one eats the old one's spot. πŸ”₯
  • backend_data β€” backends can use this to store additional meta data as they see fit. it's the junk drawer, but make it intentional.
for instance, this is used in the CouchDB backend to track entry revisions for the opportunistic locking, and in KiokuDB::Backend::BDB::GIN to to store extracted keys. (again, the "to to" is canon, i don't make the rules, i just respect them. 😭)
  • deleted β€” used for marking entries for deletion. the sad little flag. πŸ₯€
deletion entries can be generated using the deletion_entry method, which creates a new derived entry with no data but retaining the ID. so she loses everything except her name. it's giving tragic backstory. πŸ’€

🫢 AUTHOR 🫢

Yuval Kogman <nothingmuch@woobling.org>

this software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, honestly. free as in freedom, bestie. 🌈


and that's the page!! perl v5.34.0, dated 2022-05-23 β€” mwah, sending you off with a kiss and a KiokuDB::Entry(3pm) in your heart. go forth and store things responsibly. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from