Otogiri::Plugin::Count - Otogiri plugin to count rows in database.
use Otogiri; use Otogiri::Plugin; my $db = Otogiri->new( connect_info => [ ... ] ); $db->load_plugin('Count'); my $count = $db->count('some_table'); # SELECT COUNT(*) FROM some_table my $count2 = $db->count('some_table', 'column1', { group_id => 123 }); # SELECT COUNT(column1) WHERE group_id=123 my $count3 = $db->count('some_table', { group_id => 123 }); # SELECT COUNT(*) WHERE group_id=123
Otogiri::Plugin::Count is plugin for Otogiri to count database rows.
Copyright (C) Takuya Tsuchida.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Takuya Tsuchida <tsucchi@cpan.org>
To install Otogiri::Plugin::Count, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Otogiri::Plugin::Count
CPAN shell
perl -MCPAN -e shell install Otogiri::Plugin::Count
For more information on module installation, please visit the detailed CPAN module installation guide.