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

DBIx::DataSource - Database-independant create and drop functions

Author

Bugs

       If DBI data sources were objects, these functions would be methods.

Description

       This module implements create_database and drop_database functions for databases.  It aims to provide a
       common interface to database creation and deletion regardless of the actual database being used.

       Currently supported databases are MySQL and PostgreSQL.  Assistance adding support for other databases is
       welcomed and relatively simple - see DBIx::DataSource::Driver.

Functions

       create_database DATA_SOURCE USERNAME PASSWORD
           Create the database specified by the given DBI data source.

       drop_database DATA_SOURCE
           Drop the database specified by the given DBI data source.

Name

       DBIx::DataSource - Database-independant create and drop functions

See Also

       DBIx::DataSource::Driver, DBIx::DataSource::mysql, DBIx::DataSource::Pg, DBI

perl v5.34.0                                       2022-06-13                                    DataSource(3pm)

Synopsis

         use DBIx::DataSource qw( create_database drop_database );

         create_database( $data_source, $username, $password )
           or warn $DBIx::DataSource::errstr;

         drop_database( $data_source, $username, $password )
           or warn $DBIx::DataSource::errstr;

See Also