Mail::...n::Sql(3pm)

πŸ’– NAME πŸ’–

Mail::MtPolicyd::Connection::Sql β€” bestie, it's a connection pool sql connection object. That's it, that's the whole vibe. ✨

(Also, the header at the top of this page squishes the name all the way down to Mail::...n::Sql(3pm) because terminals are dramatic like that. Same module, same energy. 🫢)


🌸 VERSION 🌸

version 2.05 β€” that's the one we're talking about, no cap. πŸ‘‘


✨ SYNOPSIS ✨

Okay so here's how you actually wire it up, copy-paste ready:

<Connection db>
  module = "Sql"
  # see perldoc DBI for syntax of dsn connection string
  dsn = "dbi:SQLite:dbname=/var/lib/mtpolicyd/mtpolicyd.sqlite"
  # user = "mtpolicyd"
  # user = "secret"
</Connection>

Look at that block. Iconic. πŸ’… (And yes, that second commented line really does say user β€” it's exactly as it appears, we don't fix, we don't touch, we just report. πŸ“)


πŸ¦‹ PARAMETERS πŸ¦‹

  • dsn (required!!) β€” a perl DBI connection string. This is the whole "where is my database, actually" situation. Cannot skip this one, fr fr. 😀

Some examples to steal:

dbi:SQLite:dbname=/var/lib/mtpolicyd/mtpolicyd.sqlite
dbi:SQLite::memory:
DBI:mysql:database=test;host=localhost

Also: see DBI. Like, actually go read it. πŸ‘€

  • user (default: '') β€” a username, if your connection needs one. If it doesn't, leave it, she's fine as an empty string. 🌈
  • password (default: '') β€” a password, if that user/connection needs one. Same deal: empty by default, fill it in if you gotta. πŸ”

πŸŽ€ AUTHOR πŸŽ€

Markus Benning <ich@markusbenning.de> β€” the actual genius behind all of this. Shoutout. 🫢✨


This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.

This is free software, licensed under:

The GNU General Public License, Version 2, June 1991

Okay bestie, that's the whole page. Go forth and pool those SQL connections. Slay. πŸ’œ

perl v5.38.2 Β· 2024-05-26 Β· page name Mail::...n::Sql(3pm) β€” mwah, that's a wrap, ily, bye! πŸ¦‹πŸŽ€πŸ’–

πŸ“¦ where this page comes from