Bigtop::ScriptHelp::Style::PgLive - gets its descriptions from Postgresql
For normal use:
bigtop -n AppName -s Pg8Live \ 'dbi:Pg:dbname=yourdb' user pass [schema]
Do the same for tentmaker. It also works for -a:
bigtop -a docs/app.bigtop \ -s Pg8Live 'dbi:Pg:dbname=yourdb' user pass [schema]
Only tables not in docs/app.bigtop will be affected.
For use in scripts:
use Bigtop::ScriptHelp::Style; my $style = Bigtop::ScriptHelp::Style->get_style( 'PgLive' ); # then pass $style to methods of Bigtop::ScriptHelp
See Bigtop::ScriptHelp::Style for a description of what this module must do in general.
Bigtop::ScriptHelp::Style
This module pulls the database layout from the supplied database. It makes queries on internal postgres tables to retrieve its data. The queries are probably specific to postgres 8.x. They may work for earlier versions, but I wouldn't want to put any money down on that.
This module pulls these things from the database whose dsn you supply:
table names
column names
SQL type of each column
primary keys
column default values
foreign keys
This method does not use standard in. Instead, it expects these command line arguments (in order):
Suitable for handing to DBI->connect. Example:
dbi:Pg:dbname=yourdb
Defaults to 'public.' Use this if you need to bring in tables from one schema. There is no support for handling multiple schemas with a single invocation, but there is no rule against rerunning with the -a flag to bring in others.
Phil Crow, <crow.phil@gmail.com>
Copyright (C) 2007, Phil Crow
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Bigtop, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bigtop
CPAN shell
perl -MCPAN -e shell install Bigtop
For more information on module installation, please visit the detailed CPAN module installation guide.