Otogiri::Plugin::SelectWithColumns - Otogiri plugin to search row-data that contains only specific columns from database
use Otogiri; use Otogiri::Plugin; my $db = Otogiri->new(connect_info => [...]); $db->load_plugin('SelectWithColumns'); ## SELECT `id`, `name` FROM `some_table` WHERE `author`="ytnobody" ORDER BY id ASC my @rows = $db->select_with_columns( 'some_table', ['id', 'name'], {'author' => 'ytnobody'}, {order_by => 'id ASC'} ); my $row = $rows[0]; print join(", ", keys($row)) . "\n"; ## --> "id, name\n"
Otogiri::Plugin::SelectWithColumns is plugin for Otogiri to search row-data that contains only specific columns from database。
Copyright (C) Satoshi Azuma.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Satoshi Azuma <ytnobody@gmail.com>
To install Otogiri::Plugin::SelectWithColumns, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Otogiri::Plugin::SelectWithColumns
CPAN shell
perl -MCPAN -e shell install Otogiri::Plugin::SelectWithColumns
For more information on module installation, please visit the detailed CPAN module installation guide.