App-DBIUtils

 view release on metacpan or  search on metacpan

bin/dump-dbi-column-info  view on Meta::CPAN

            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

=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

You 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

    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

=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

You 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.263 second using v1.01-cache-2.11-cpan-e9199f4ba4c )