GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AbstractCount(3) User Contributed Perl Documentation AbstractCount(3)

Class::DBI::Plugin::AbstractCount - get COUNT(*) results with abstract SQL

  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 ] }
    });

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.

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.

More tests, more doc.

SQL::Abstract for details about the where-clause and the attributes.
Class::DBI::AbstractSearch
Class::DBI::Plugin::CountSearch

Jean-Christophe Zeus, <mail@jczeus.com> with some help from Tatsuhiko Myagawa and Todd Holbrook.

Copyright (C) 2004 by Jean-Christophe Zeus

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2009-07-01 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.