NOTEDB::mysql(3pm)

πŸ“¦
version 1.4.2 Β· 3 versions
, in ubuntu stonking

πŸ’– NAME πŸ’–

NOTEDB::mysql β€” a lil module lib for accessing a notedb from perl 🫢


✨ SYNOPSIS ✨

okay bestie, here's the whole vibe in code form:

        # include the module
        use NOTEDB;

        # create a new NOTEDB object (the last 4 params are db table/field names)
        $db = new NOTEDB("mysql","note","localhost","username","password","note","number","note","date");

        # get a single note
        ($note, $date) = $db->get_single(1);

        # search for a certain note
        %matching_notes = $db->get_search("somewhat");
        # format of returned hash:
        #$matching_notes{$numberofnote}->{'note' => 'something', 'date' => '23.12.2000 10:33:02'}

        # get all existing notes
        %all_notes = $db->get_all();
        # format of returns hash like the one from get_search above

        # get the next noteid available
        $next_num = $db->get_nextnum();

        # recount all noteids starting by 1 (useful after deleting one!)
        $db->set_recountnums();

        # modify a certain note
        $db->set_edit(1, "any text", "23.12.2000 10:33:02");

        # create a new note
        $db->set_new(5, "any new text", "23.12.2000 10:33:02");

        # delete a certain note
        $db->set_del(5);

        # turn on encryption. CryptMethod must be IDEA, DES or BLOWFISH
        $db->use_crypt("passphrase", "CryptMethod");

        # turn off encryption. This is the default.
        $db->no_crypt();

🌸 DESCRIPTION 🌸

so like, you can use this module to get into a note database πŸ’… There are currently two versions of it β€” one for a SQL database and one for a binary file (that's note's own database-format, iykyk). And the iconic part? both versions provide identical interfaces πŸŽ€ which means you literally do NOT have to change your code if you wanna switch to another database format. no cap, that's the whole point.

Right now NOTEDB is only used by note itself 🌟 but fr fr, feel free to use it in your own project! Maybe someone wants to implement a web interface for note… πŸ‘€ main character energy, honestly.


πŸ¦‹ USAGE πŸ¦‹

please see the section SYNOPSIS, it says it all πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Thomas Linden <tom@daemon.de>.


that's the whole page bestie, no crumbs left πŸ“ this was pulled from the User Contributed Perl Documentation, perl v5.40.1, dated 2026-08-10 ✨ slay, bye πŸ’–

πŸ“¦ where this page comes from