Sympa::Database(3Sympa)

πŸ’– Sympa::Database πŸ’–

okay bestie, this is Sympa::Database from the 3Sympa manual section β€” it's the little legend that handles handling databases for sympa 6.2.80. yes, that's the whole vibe: it talks to your databases so you don't have to. 🫢


✨ SYNOPSIS ✨

use Sympa::Database;

$database = Sympa::Database->new('SQLite', db_name => '...');
    or die 'Cannot connect to database';
$sth = $database->do_prepared_query('SELECT FROM ...', ...)
    or die 'Cannot execute query';
$database->disconnect;

look at that flow. construct, query, disconnect. self care honestly. πŸ’…


🌸 DESCRIPTION 🌸

TBD.

no literally, bestie, that's it. that's the description. it's giving minimal. it's giving mysterious. the manpage said "TBD." and i respect the honesty fr fr. 😭


πŸŽ€ Methods πŸŽ€

new ( $db_type, [ option => value, ... ] )

Constructor energy. ✨ It creates a brand new database instance β€” a fresh little database baby, if you will.


do_operation ( $operation, options... )

Instance method, and heads up: only for LDAP. It performs an LDAP search operation. For the deets on what those options even are, go peek at "search" in Net::LDAP β€” that's where the lore lives, iykyk. πŸ”

Returns:

  • An operation handle (an LDAP::Search object or such), or "undef".

do_prepared_query ( $statement, parameters... )

Instance method, and this one is only for SQL. It prepares and executes an SQL query in one glow-up. $statement is an SQL statement that may contain placeholders β€” the iconic "?" β€” and the parameters slide right into those slots. 🧚

Returns:

  • A statement handle (a DBI::st object or such), or "undef".

do_query ( $statement, parameters... )

Instance method, only for SQL again. This one just executes an SQL query β€” no prepare-and-chill, it's going straight in. $statement and parameters will be fed to sprintf(). πŸ”₯

Returns:

  • A statement handle (a DBI::st object or such), or "undef".
ngl bestie, note the difference: do_prepared_query does the prepare step with ? placeholders, while do_query runs the sprintf() route. two different flavors, both valid. don't mix them up and you'll be golden. πŸ‘‘

🌈 SEE ALSO 🌈

  • Sympa::DatabaseDriver β€” because every database main character needs a driver bestie. πŸ¦‹

⭐ HISTORY ⭐

Sympa Database Manager (SDM) appeared on Sympa 6.2. a whole era. we love a debut. πŸ’œ


remember: keep every option name, placeholder and variable spelled exactly right β€” $db_type, $operation, $statement, ? β€” because the computer does not accept vibes as syntax, no matter how immaculate they are. πŸ’€

and that's the whole page, bestie!! mwah. 😘 this was sympa 6.2.80, dated 2026-10-19, from the Sympa::Database(3Sympa) manual β€” slay, stay hydrated, and always disconnect when you're done. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from