logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Sympa::Database - Handling databases

Description

       TBD.

   Methods
       new ( $db_type, [ option => value, ... ] )
           Constructor.  Creates new database instance.

       do_operation ( $operation, options... )
           Instancemethod,  onlyforLDAP.   Performs  LDAP search operation.  About options see "search" in
           Net::LDAP.

           Returns:

           Operation handle (LDAP::Search object or such), or "undef".

       do_prepared_query ( $statement, parameters... )
           Instancemethod, onlyforSQL.  Prepares and executes SQL query.  $statement is an SQL statement that
           may contain placeholders "?".

           Returns:

           Statement handle (DBI::st object or such), or "undef".

       do_query ( $statement, parameters... )
           Instancemethod, onlyforSQL.  Executes SQL  query.   $statement  and  parameters  will  be  fed  to
           sprintf().

           Returns:

           Statement handle (DBI::st object or such), or "undef".

History

       Sympa Database Manager (SDM) appeared on Sympa 6.2.

6.2.76                                             2025-02-12                            Sympa::Database(3Sympa)

Name

       Sympa::Database - Handling databases

See Also

       Sympa::DatabaseDriver.

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;

See Also