DBIx::ReportBuilder::Search - Extended SearchBuilder
my $sb = DBIx::ReportBuilder::Search->new( Host => 'localhost', Port => '3306', User => 'root', Driver => 'mysql', Database => 'rt3', ); $sb->SetTable('Queues'); $sb->GroupBy( FIELD => 'Disabled' ); my $col1 = $sb->Column( FIELD => 'Disabled' ); my $col2 = $sb->Column( FIELD => 'Id', FUNCTION => 'SUM' ); my $col3 = $sb->Column( FIELD => 'Id', FUNCTION => 'COUNT' ); $sb->UnLimit; print join("\t", qw(Disabled SUM(id) COUNT(id))), "\n"; while (my $row = $sb->Next) { print join( "\t", $row->{$col1}, $row->{$col2}, $row->{$col3} ), "\n"; };
This module implements a subclass of DBIx::SearchBuilder. The main difference is that it defines a default LoadFromHash and NewItem, so is directly usable without needing to subclass it first.
LoadFromHash
NewItem
It also implements GroupBy, GroupByCols, Column and an assortment of other utility functions.
GroupBy
GroupByCols
Column
DBIx::ReportBuilder, DBIx::SearchBuilder
Autrijus Tang <autrijus@autrijus.org>
Copyright 2003 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install DBIx::ReportBuilder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::ReportBuilder
CPAN shell
perl -MCPAN -e shell install DBIx::ReportBuilder
For more information on module installation, please visit the detailed CPAN module installation guide.