CPAN::...pulate(3pm)

πŸ“¦
version 0.220 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– CPAN::SQLite::Populate πŸ’–

okay bestie, gather round, because this is the CPAN::SQLite::Populate page from the 3pm manual section and it is literally the database-building baddie of the CPAN::SQLite universe. no cap. 🫢


✨ VERSION ✨

version 0.220 β€” she's serving, she's current, she's iconic. πŸ‘‘


🌸 DESCRIPTION 🌸

So basically this module has two jobs and she does both flawlessly: she creates the tables (but only if setup gets passed in as an option, okay? we don't do uninvited table-making here πŸ’…), and then she handles the inserting, updating, or deleting β€” whichever one is the moment β€” of all the relevant info from the indices of CPAN::SQLite::Info plus the state info from CPAN::SQLite::State.

How does she do it? Through the insert, update, and delete methods that live on each table. main character energy fr fr. ✨

🚨 IMPORTANT BESTIE ALERT 🚨 the tables get created with the setup argument that you pass into the new method when you're making the CPAN::SQLite::Index object. and like… existing tables? they get dropped. gone. bye. πŸ’€ so know what you're doing before you pass that.

πŸŽ€ TABLES πŸŽ€

Here's the rundown on every table β€” the data types shown are the mysql</> ones, with the corresponding adjustments made if you're on a SQLite database instead. iykyk. πŸ¦‹

🧚 mods

This one holds all the module info, and she gets created like this:

mod_id INTEGER NOT NULL PRIMARY KEY
mod_name VARCHAR(100) NOT NULL
dist_id INTEGER NOT NULL
mod_abs TEXT
mod_vers VARCHAR(10)
  • mod_id β€” this is the primary (unique) key of the table. the one and only. πŸ‘‘
  • dist_id β€” this key matches up with the id of the associated distribution over in the dists table.
  • mod_name β€” the module's name. yeah that's it, that's the vibe.
  • mod_abs β€” a description of the module, if there's one available. lowkey optional, highkey useful. ✨
  • mod_vers β€” if it's present, this gives you the version of the module.

🌈 dists

Distribution info lives here, and she's built like:

dist_id INTEGER NOT NULL PRIMARY KEY
dist_name VARCHAR(90) NOT NULL
auth_id INTEGER NOT NULL
dist_file VARCHAR(110) NOT NULL
dist_vers VARCHAR(20)
dist_abs TEXT
  • dist_id β€” the primary (unique) key of the table. iconic behavior. πŸ’…
  • auth_id β€” this one corresponds to the CPAN author id of the distribution, which lives over in the auths table.
  • dist_name β€” this is the distribution name. like, for My-Distname-0.22.tar.gz, dist_name is gonna be My-Distname. see how that works? πŸ“
  • dist_file β€” this corresponds to the CPAN file name.
  • dist_vers β€” the version of the CPAN file. for My-Distname-0.22.tar.gz, dist_vers is 0.22. math is mathing. ✨
  • dist_abs β€” a description of the distribution. and if one wasn't directly supplied, then the description for, like, Foo::Bar (if present) gets used for the Foo-Bar distribution. recycling queen. 🧚

πŸ’œ auths

CPAN author info goes here, and she's created as:

auth_id INTEGER NOT NULL PRIMARY KEY
cpanid VARCHAR(20) NOT NULL
fullname VARCHAR(40) NOT NULL
email TEXT
  • auth_id β€” the primary (unique) key of the table, periodt.
  • cpanid β€” gives you the CPAN author id.
  • fullname β€” the full name of the author. πŸ’–
  • email β€” the email address the author supplied. πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯

  • CPAN::SQLite::Index β€” go read that one next bestie, they're a set 🫢

and that's the whole page, you ate it, no crumbs πŸ’…βœ¨

this was CPAN::SQLite::Populate, version 0.220, living in the 3pm manual section β€” the perl she was documented under was perl v5.36.0, and the date on the whole thing was 2022-10-30. thanks for coming to my ted talk, mwah πŸŽ€πŸ’–

πŸ“¦ where this page comes from