The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DBIx::Handler::Sunny - DBIx::Handler meets Sunny

SYNOPSIS

use DBIx::Handler::Sunny;
my $handler = DBIx::Handler::Sunny->new($dsn, $user, $pass, $opts);
my $col = $handler->select_one('SELECT ...');
my $row = $handler->select_row('SELECT ...');
my $rows = $handler->select_all('SELECT ...');

DESCRIPTION

DBIx::Handler::Sunny is a DBI handler with some useful interface. It ads DBIx::Handler to methods for selecting a column or row(s).

The methods are taken from DBIx::Sunny.

METHODS

select_one
$col = $handler->select_one($query, @bind);

Shortcut for prepare, execute and fetchrow_arrayref->[0].

select_row
$row = $handler->select_row($query, @bind);

Shortcut for prepare, execute and fetchrow_hashref.

select_all
$rows = $handler->select_all($query, @bind);

Shortcut for prepare, execute and selectall_arrayref(..., { Slice => {} }, ...).

last_insert_id
$id = $handler->last_insert_id

Retrieve the last insert ID by suitable way for the DB driver. Supported drivers are SQLite and MySQL.

SEE ALSO

DBIx::Handler

DBIx::Sunny

LICENSE

Copyright (C) INA Lintaro

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

INA Lintaro <tarao.gnn@gmail.com>