Wiki::...SQLite(3pm)

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

πŸ’– NAME πŸ’–

You're on the Wiki::...SQLite(3pm) page β€” User Contributed Perl Documentation, bestie β€” and the main character is Wiki::Toolkit::Store::SQLite: the SQLite storage backend for Wiki::Toolkit. No cap, that's the whole name-and-purpose vibe. πŸ¦‹

✨ SYNOPSIS ✨

The synopsis is short and iconic: see Wiki::Toolkit::Store::Database. That's it. That's the whole section. πŸ’…

🌸 METHODS 🌸

πŸŽ€ new πŸŽ€

Create your store like this:

       my $store = Wiki::Toolkit::Store::SQLite->new( dbname => "wiki" );

The dbname parameter is mandatory β€” you literally have to pass it, no skipping, periodt. 🫢

πŸ¦‹ check_and_write_node πŸ¦‹

       $store->check_and_write_node( node     => $node,
                           checksum => $checksum,
                                           %other_args );

This method locks the node, verifies the checksum, calls write_node_post_locking with all the arguments you supplied, and then unlocks the node. Lock it, check it, call it, unlock it β€” the full routine, bestie. ✨

It returns the version of the updated node on successful writing. It returns 0 if the checksum doesn't match, -1 if the change was not applied, and it croaks on error. So yeah: success gives you the version, mismatch gives you 0, not-applied gives you -1, and errors are a whole dramatic croak situation. 😭


That's the page, bb: perl v5.32.0, dated 2021-01-04, and it's literally Wiki::...SQLite(3pm). Mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from