| 1 |
Class/DBI/Plugin/AbstractCount version 0.04 |
| 2 |
=========================================== |
| 3 |
|
| 4 |
INSTALLATION |
| 5 |
|
| 6 |
To install this module type the following: |
| 7 |
|
| 8 |
perl Makefile.PL |
| 9 |
make |
| 10 |
make test |
| 11 |
make install |
| 12 |
|
| 13 |
DEPENDENCIES |
| 14 |
|
| 15 |
This module requires these other modules and libraries: |
| 16 |
|
| 17 |
Class::DBI >= 0.90 |
| 18 |
|
| 19 |
SYNOPSIS |
| 20 |
|
| 21 |
use base 'Class::DBI'; |
| 22 |
use Class::DBI::Plugin::AbstractCount; |
| 23 |
|
| 24 |
my $count = Music::Vinyl->count_search_where( |
| 25 |
{ artist => 'Frank Zappa' |
| 26 |
, title => { like => '%Shut Up 'n Play Yer Guitar%' } |
| 27 |
, released => { between => [ 1980, 1982 ] } |
| 28 |
}); |
| 29 |
|
| 30 |
DESCRIPTION |
| 31 |
|
| 32 |
This Class::DBI plugin combines the functionality from |
| 33 |
Class::DBI::Plugin::CountSearch (counting objects without having to use an |
| 34 |
array or an iterator), and Class::DBI::AbstractSearch, which allows complex |
| 35 |
where-clauses a la SQL::Abstract. |
| 36 |
|
| 37 |
METHODS |
| 38 |
|
| 39 |
count_search_where |
| 40 |
|
| 41 |
Takes a hashref with the abstract where-clause. An additional attribute |
| 42 |
hashref can be passed to influence the default behaviour: arrayrefs are |
| 43 |
OR'ed, hashrefs are AND'ed. |
| 44 |
|
| 45 |
TODO |
| 46 |
|
| 47 |
More tests, more doc. |
| 48 |
|
| 49 |
SEE ALSO |
| 50 |
|
| 51 |
SQL::Abstract for details about the where-clause and the attributes. |
| 52 |
Class::DBI::AbstractSearch |
| 53 |
Class::DBI::Plugin::CountSearch |
| 54 |
|
| 55 |
AUTHOR |
| 56 |
|
| 57 |
Jean-Christophe Zeus, <[email protected]> with some help from Tatsuhiko |
| 58 |
Myagawa and Todd Holbrook. |
| 59 |
|
| 60 |
COPYRIGHT AND LICENCE |
| 61 |
|
| 62 |
Copyright (C) 2004 Jean-Christophe Zeus |
| 63 |
|
| 64 |
This library is free software; you can redistribute it and/or modify |
| 65 |
it under the same terms as Perl itself. |
| 66 |
|