Class::DBI::Plugin::AbstractCount(3pm)

Class::DBI::Plugin::AbstractCount3pm

Get count(*) results with abstract sql

Usage

  use base 'Class::DBI';
  use Class::DBI::Plugin::AbstractCount;
  
  my $count = Music::Vinyl->count_search_where(
    { artist   => 'Frank Zappa'
    , title    => { like    => '%Shut Up 'n Play Yer Guitar%' }
    , released => { between => [ 1980, 1982 ] }
    });

Overview

This Class::DBI plugin combines the functionality from Class::DBI::Plugin::CountSearch (counting objects without having to use an array or an iterator), and Class::DBI::AbstractSearch, which allows complex where-clauses a la SQL::Abstract.

Methods

count_search_where

Takes a hashref with the abstract where-clause. An additional attribute hashref can be passed to influence the default behaviour: arrayrefs are OR'ed, hashrefs are AND'ed.

Todo

More tests, more doc.

Releases

10 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0–9
  4. 10
  5. 11
  6. 12–13

Author

Jean-Christophe Zeus, <[email protected]> with some help from Tatsuhiko Myagawa and Todd Holbrook.

From libclass-dbi-plugin-abstractcount-perl 0.08-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.