UR::Da...SQLite(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

ok so UR::DataSource::SQLite is literally the base class for datasources that ride with the SQLite3 RDBMS πŸ’… that's the whole job. it's in the 3pm manual, part of the User Contributed Perl Documentation, and yes bestie it's giving exactly what you think it's giving.


✨ SYNOPSIS ✨

first up, if you're chillin in the shell, just say the magic words πŸͺ„

ur define datasource sqlite

orrr you can go full main character and write the singleton yourself so it reps the source directly πŸ‘‘

class Acme::DataSource::MyDB1 {
    is => 'UR::DataSource::SQLite',
    has_constant => [
        server => '/var/lib/acme-app/mydb1.sqlitedb'
    ]
};

bestie wait, there's more 🌸 you can also point it at a whole directory stuffed with *.sqlite3 files. but heads up β€” the primary database must be named main.sqlite3, no cap. every other *.sqlite3 file in there gets attached the moment the database is opened πŸ”₯

class Acme::DataSource::MyDB2 {
    is => 'UR::DataSource::SQLite',
    has_constant => [
        server => '/path/to/directory/'
    ]
};

that's the whole vibe, fr fr β€” short and iconic, just like it should be πŸ¦‹

πŸ’Œ sign-off time: this lil masterpiece is perl v5.32.1, dated 2022-01-17, and it lives under the User Contributed Perl Documentation umbrella. mwah πŸ’‹

πŸ“¦ where this page comes from