Egg::Plugin::DBI::Accessors - Convenient accessor to dbh.
use MYPROJECT; use strict; use Egg qw/DBI::Accessors/;
Example of code.
my $scalar= $e->dbh_scalarref(q{ SELECT foo FROM hoge WHERE id = ? }, '123') || Egg::Error->error 'Data is not found.'; my $hash= $e->dbh_hashref('foo', q{ SELECT * FROM hoge WHERE id = ? }, '123') || Egg::Error->error 'Data is not found.'; my $array= $e->dbh_arrayref(q{ SELECT * FROM hoge WHERE type = ? }, 'udon') || Egg::Error->error 'Data is not found.'; $e->dbh_any( q{ INSERT INTO hoge (id, type, name) VALUES (?, ?, ?) }, '124', 'udon', 'banban', );
When the data base handler is treated, it is ..some procedure.. omissible.
It is effective because Egg::Plugin::DBI::CommitOK has been succeeded to even if it doesn't describe it in the controller. However, committing is not done in the automatic operation.
The execution result is returned by the HASH reference.
Please specify the field name of the content's being sure being sure to exist for [KEY].
The execution result is returned by the ARRAY reference.
The execution result is returned by the SCALAR reference.
When it doesn't generate the return value.
Egg::Plugin::DBI::CommitOK Egg::Release,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2006 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.