NAME
HashData::DBI - Get hash data from DBI
VERSION
This document describes version 0.001 of HashData::DBI (from Perl distribution HashDataRoles-Standard), released on 2021-05-21.
SYNOPSIS
use HashData::DBI;
my $ary = HashData::DBI->new(
iterate_sth => $dbh->prepare("SELECT mykey,myval FROM mytable"),
get_by_key_sth => $dbh->prepare("SELECT myval FROM mytable WHERE mykey=?"),
row_count_sth => $dbh->prepare("SELECT COUNT(*) FROM mytable"),
);
# or
my $ary = HashData::DBI->new(
dsn => "DBI:mysql:database=mydb",
user => "...",
password => "...",
table => "mytable",
key_column => "mykey",
val_column => "myval",
);
DESCRIPTION
This is an HashData::
module to get array elements from a DBI query.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/HashDataRoles-Standard.
SOURCE
Source repository is at https://github.com/perlancar/perl-HashDataRoles-Standard.
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/perlancar/perl-HashDataRoles-Standard/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.