Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tarao/perl5-dbix-handler-sunny
https://github.com/tarao/perl5-dbix-handler-sunny
perl
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tarao/perl5-dbix-handler-sunny
- Owner: tarao
- License: other
- Created: 2015-03-09T11:38:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-09T01:37:38.000Z (over 7 years ago)
- Last Synced: 2024-10-16T05:43:43.358Z (2 months ago)
- Topics: perl
- Language: Perl
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/tarao/perl5-DBIx-Handler-Sunny.svg?branch=master)](https://travis-ci.org/tarao/perl5-DBIx-Handler-Sunny)
# NAMEDBIx::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](https://metacpan.org/pod/DBIx::Handler) to methods for selecting a column or row(s).The methods are taken from [DBIx::Sunny](https://metacpan.org/pod/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](https://metacpan.org/pod/DBIx::Handler)
[DBIx::Sunny](https://metacpan.org/pod/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