KiokuD...rialIDs(3pm)

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

πŸ’– KiokuD...rialIDs β€” the tea β˜•

okay bestie, so this is a page from the User Contributed Perl Documentation, and it's filed under KiokuD...rialIDs(3pm). Yes the name is truncated, no we don't know why, it's giving cryptic queen energy πŸ’…. Anyway. Sit down, grab a boba, we're learning about serial IDs.


✨ NAME ✨

KiokuDB::Role::UUIDs::SerialIDs β€” serial ID assignment based on a global counter. no cap, that's literally the whole vibe.


πŸ¦‹ VERSION πŸ¦‹

version 0.57


🌸 SYNOPSIS 🌸

okay so the way you use this is you set the flag before you load the module, like this:

# set before loading:

BEGIN { $KiokuDB::SERIAL_IDS = 1 }

use KiokuDB;

see how the BEGIN block comes first? that's not a suggestion bestie, that's the whole point. set it, then use it. order matters, periodt ✨


πŸ’… DESCRIPTION πŸ’…

so this role is an alternate ID generation role, and it is development only. read that again. development. only. 🚨

its whole purpose is to make testing easier when your database gets created from scratch on every single run. because with this role, objects will typically get assigned the same IDs between runs, which makes everything way easier to follow. it's giving consistency, it's giving "wait why is this object always 1", it's giving πŸŽ€ predictability πŸŽ€.

DO NOT use this role for storing actual real data. like, seriously. ID clashes are almost guaranteed to cause data loss. that's not a vibe, that's a tragedy πŸ’€. this is a dev toy, not a production girlie.

πŸ‘‘ 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.


okay that's the whole page, you ate that πŸ“πŸ’œ

sign-off time: this was brought to you by perl v5.34.0, dated 2022-05-23 β€” and yes, the title up top still says KiokuD...rialIDs(3pm) because some things are just iconic and stay exactly as they are 🌈⭐ bye bestie, hydrate and don't use serial IDs in prod πŸ’–

πŸ“¦ where this page comes from