Skip to content

Commit

Permalink
usage pod with examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jozef committed Jun 7, 2012
1 parent b4c66bf commit 3ffb43f
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion bin/sql-admin.pl
Expand Up @@ -30,7 +30,7 @@

sub main { # ;
my $action = shift @ARGV;
pod2usage('Unknown action')
pod2usage('Unknown action '.$action)
unless $action && exists $action_map{$action};
my $factory = SQL::Admin->new;

Expand Down Expand Up @@ -168,3 +168,23 @@ =head1 SYNOPSIS
sql-admin <action> --source <source driver> <source driver parameters>
--destination <destination driver> <destination driver parameters>
--output <output driver> <output driver parameters>
<action> - dump or compare
<* driver> - Pg or DB2
when connecting to the database Pg::DBI or DB2::DBI
Examples:
sql-admin.pl dump --source Pg::DBI \
'--source-dbdsn=dbi:Pg:dbname=some_name;host=localhost' \
--source-dbusr username \
--source-dbpwd password \
--output Pg
sql-admin.pl compare
--source Pg::DBI \
'--source-dbdsn=dbi:Pg:dbname=some_name;host=localhost' \
--source-dbusr username \
--source-dbpwd password \
--destination Pg \
--source-file create.sql \
--output Pg

0 comments on commit 3ffb43f

Please sign in to comment.