Rose::Planter::DB -- base db class for Rose-Planter planted objects.
This is derived from Rose::DB, but adds a few class methods as described below. Also, it allows database to be registered based on configuration files.
This is defined here to serialize durations as postgres intervals.
Connect and retain the db handle. Also, set the time zone to UTC.
Overridden to hold onto dbh's.
Register all the rose databases for this class.
module_name: The name of the perl module for which we are registering databases. This will be used to check for an environment variable named (uc $module_name)."_LIVE" to see if the live database configuration should be used. Also, if a unit test suite is running, the current Module::Build object will indicate that this module is being tested and hence a test database should be used.
register_params: A hash of parameters to be sent verbatim to Rose::DB::register_db.
conf: a configuration object which will be queried as follows :
$conf->db : parameters for the database.
This should return a hash with keys such as "database", "schema", and "host" which correspond to the parameters sent to Rose::DB::register_db.
If Module::Build::Database is being used, the "test" database will be determined using information stored in the _build directory. This allows the same database to be re-used during an entire './Build test'.
When HARNESS_ACTIVE is true, conf should not be passed.
Given a module name, return the name of the Rose::DB-derived class which called register_databases.
Load a golden dataset into the database.
Just like the overridden method in Rose::DB.pm except that it ignores database objects that begin with 'v_'. This provides a naming convention to avoid warnings for missing keys when loading views.
Do some sql and return the result as an arrayref of hashrefs.
To install Rose::Planter, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.