App-DBIUtils
view release on metacpan or search on metacpan
bin/dump-dbi-column-info view on Meta::CPAN
192021222324252627282930313233343536373839404142434445464748495051525354
pos
=> 0,
},
table
=> {
schema
=>
'str*'
,
req
=> 1,
pos
=> 1,
},
user
=> {
schema
=>
'str*'
,
},
password
=> {
schema
=>
'str*'
,
},
catalog
=> {
schema
=>
'str*'
,
},
schema
=> {
schema
=>
'str*'
,
default
=>
'main'
,
},
},
};
sub
dump_dbi_column_info {
my
%args
=
@_
;
my
$dbh
= DBI->
connect
(
$args
{dsn},
$args
{user},
$args
{password},
{
RaiseError
=>1});
my
@rows
;
my
$sth
=
$dbh
->column_info(
$args
{catalog},
$args
{schema},
$args
{table},
undef
);
while
(
my
$row
=
$sth
->fetchrow_hashref) {
push
@rows
,
$row
;
}
[200,
"OK"
, \
@rows
];
}
Perinci::CmdLine::Any->new(
url
=>
'/main/dump_dbi_column_info'
)->run;
bin/dump-dbi-column-info view on Meta::CPAN
154155156157158159160161162163164165166167168169170171172173174=over
=item B<--catalog>=I<s>
=item B<--dsn>=I<s>*
=item B<--help>, B<-h>, B<-?>
Display help message and exit.
=item B<--password>=I<s>
=item B<--schema>=I<s>
Default value:
"main"
=item B<--table>=I<s>*
=item B<--user>=I<s>
bin/dump-dbi-column-info view on Meta::CPAN
230231232233234235236237238239240241242243244245246247248249You can also put configuration
for
multiple programs inside a single file, and
use
filter C<program=NAME> in section names, e.g. C<[program=foo ...]>. The section will then only be used
when
the reading program matches.
Finally, you can filter a section by environment variable using the filter C<env=CONDITION> in section names. For example
if
you only want a section to be
read
if
a certain environment variable is true: C<[env=SOMEVAR ...]>. If you only want a sectio...
List of available configuration parameters:
catalog (see --catalog)
dsn (see --dsn)
format
(see --
format
)
naked_res (see --naked-res)
password (see --password)
schema (see --schema)
table (see --table)
user (see --user)
=head1 ENVIRONMENT
=head2 DUMP_DBI_COLUMN_INFO_OPT => str
Specify additional command-line options
bin/dump-dbi-table-info view on Meta::CPAN
141516171819202122232425262728293031323334353637383940414243444546474849
summary
=>
'Dump DBI table_info() information'
,
args
=> {
dsn
=> {
schema
=>
'str*'
,
req
=> 1,
pos
=> 0,
},
user
=> {
schema
=>
'str*'
,
},
password
=> {
schema
=>
'str*'
,
},
catalog
=> {
schema
=>
'str*'
,
},
schema
=> {
schema
=>
'str*'
,
default
=>
'main'
,
},
},
};
sub
dump_dbi_table_info {
my
%args
=
@_
;
my
$dbh
= DBI->
connect
(
$args
{dsn},
$args
{user},
$args
{password},
{
RaiseError
=>1});
my
@rows
;
my
$sth
=
$dbh
->table_info(
$args
{catalog},
$args
{schema},
"%"
,
undef
);
while
(
my
$row
=
$sth
->fetchrow_hashref) {
push
@rows
,
$row
;
}
[200,
"OK"
, \
@rows
];
}
Perinci::CmdLine::Any->new(
url
=>
'/main/dump_dbi_table_info'
)->run;
bin/dump-dbi-table-info view on Meta::CPAN
149150151152153154155156157158159160161162163164165166167168169=over
=item B<--catalog>=I<s>
=item B<--dsn>=I<s>*
=item B<--help>, B<-h>, B<-?>
Display help message and exit.
=item B<--password>=I<s>
=item B<--schema>=I<s>
Default value:
"main"
=item B<--user>=I<s>
=item B<--version>, B<-v>
bin/dump-dbi-table-info view on Meta::CPAN
223224225226227228229230231232233234235236237238239240241242243You can also put configuration
for
multiple programs inside a single file, and
use
filter C<program=NAME> in section names, e.g. C<[program=foo ...]>. The section will then only be used
when
the reading program matches.
Finally, you can filter a section by environment variable using the filter C<env=CONDITION> in section names. For example
if
you only want a section to be
read
if
a certain environment variable is true: C<[env=SOMEVAR ...]>. If you only want a sectio...
List of available configuration parameters:
catalog (see --catalog)
dsn (see --dsn)
format
(see --
format
)
naked_res (see --naked-res)
password (see --password)
schema (see --schema)
user (see --user)
=head1 ENVIRONMENT
=head2 DUMP_DBI_TABLE_INFO_OPT => str
Specify additional command-line options
=head1 FILES
( run in 0.252 second using v1.01-cache-2.11-cpan-e9199f4ba4c )