Footprintless::Plugin::Database - A Footprintless plugin for working with databases
version 1.02
Provides the db factory method to the framework as well as the db command to the CLI.
db
As with all plugins, this must be registered on the footprintless entity. Also, it is necessary to specify the providers you want made available:
footprintless
plugins => [ 'Footprintless::Plugin::Database', ], 'Footprintless::Plugin::Database' => { providers => { csv => 'Footprintless::Plugin::Database::CsvProvider', mysql => 'Footprintless::Plugin::Database::MySqlProvider', postres => 'Footprintless::Plugin::Database::PostgreSqlProvider', } }
You may supply your own providers given thaty the implement they interface outlined by Footprintless::Plugin::Database::AbstractProvider:
'Footprintless::Plugin::Database' => { providers => { db2 => 'My::Database::Db2Provider', } }
Additional configuration is supported for specifying a default provider and a custom command helper implementation class:
'Footprintless::Plugin::Database' => { command_helper => 'My::Automation::CommandHelper', default_provider => 'mysql' providers => { csv => 'Footprintless::Plugin::Database::CsvProvider', mysql => 'Footprintless::Plugin::Database::MySqlProvider', postres => 'Footprintless::Plugin::Database::PostgreSqlProvider', } }
See "ENTITIES" in Footprintless::Plugin::Database::AbstractProvider for example database entity configuration.
Returns a new database provider instance. See Footprintless::Plugin::Database::AbstractProvider.
Returns a new command helper for the db command. See Footprintless::Plugin::Database::DefaultCommandHelper.
Lucas Theisen <lucastheisen@pastdev.com>
This software is copyright (c) 2016 by Lucas Theisen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please see those modules/websites for more information related to this module.
DBI
Footprintless
Footprintless::MixableBase
Footprintless::Plugin::Database
Footprintless::Plugin::Database::AbstractProvider
Footprintless::Plugin::Database::CsvProvider
Footprintless::Plugin::Database::DefaultCommandHelper
Footprintless::Plugin::Database::MySqlProvider
Footprintless::Plugin::Database::PostgreSqlProvider
To install Footprintless::Plugin::Database, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Footprintless::Plugin::Database
CPAN shell
perl -MCPAN -e shell install Footprintless::Plugin::Database
For more information on module installation, please visit the detailed CPAN module installation guide.