RE: abstract search count

[prev] [thread] [next] [Date index for 2004/06/14]

From: Jim Helm
Subject: RE: abstract search count
Date: 16:15 on 14 Jun 2004
I started a thread about the same thing a few weeks ago. I've got a
complete set of aggregate plugin methods completed, but haven't had time
to upload them, since we just bought a new house and have been moving.
I should be able to post it again in a few days. I never heard back from
the author of Class::DBI::AbstractSearch, so I'm not sure how to
proceed. Should I just duplicate his code in a new module that includes
all the aggregates (or possibly in a base class that the aggregate
methods inherit from)...

FWIW, I was going with Class::DBI::Plugin::Aggregates - included
count_where, min_where, max_where, avg_where, std_where, and one or two
more than I can't remember at the moment.

http://www.perlmonks.org/index.pl?node_id=354690

I also extended the AbstractSearch module to include limit and offset
for Postgres - it's hard to subclass the AbstractSearch though, because
it's a mixin. Maybe I just haven't hit upon the right idiom. :)

This isn't my latest version, but it gives you the idea of what I'm
trying to do.

http://www.perlmonks.org/index.pl?node_id=356028

I'd love to hear more feedback. Am I wasting my time, and should just
keep the code in my own toolkit, or are there others who would like to
see this polished up and uploaded to CPAN?

--Jim 

> -----Original Message-----
> From: Jean-Christophe Zeus [mailto:mail@xxxxxx.xxx] 
> Sent: Friday, June 11, 2004 12:47 AM
> To: cdbi-talk@xxxxxx.xxxxx.xxx
> Subject: abstract search count
> 
> 
> I prepared a little plugin for cdbi, which combines the 
> functionalities 
> of Class::DBI::Plugin::CountSearch and Class::DBI::AbstractSearch.
> 
> In case this is _not_ already possible in another way, I will upload 
> this plugin to CPAN. I suggest 
> "Class::DBI::Plugin::AbstractCount" as a 
> module name, and "count_search_where" as a method name.
> 
> Here's on of the examples from my docs:
> 
> 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 ] }
> });
> 
> Please tell me if there's already another way of doing this or if you 
> have better names for module/method.
> -- 
> J.-C Zeus (mail@xxxxxx.xxx)
> 

(message missing)

abstract search count
Jean-Christophe Zeus 07:46 on 11 Jun 2004

RE: abstract search count
Jim Helm 16:15 on 14 Jun 2004

Re: abstract search count
Jean-Christophe Zeus 14:45 on 16 Jun 2004

Re: abstract search count
Tony Bowden 07:01 on 17 Jun 2004

Re: abstract search count
Jean-Christophe Zeus 08:49 on 17 Jun 2004

Re: abstract search count
Tony Bowden 09:11 on 17 Jun 2004

Re: abstract search count
Jean-Christophe Zeus 09:39 on 17 Jun 2004

Re: abstract search count
Stephen Quinney 10:06 on 17 Jun 2004

Re: abstract search count
Jean-Christophe Zeus 10:47 on 17 Jun 2004

Re: abstract search count
Stephen Quinney 10:53 on 17 Jun 2004

Re: abstract search count
Jean-Christophe Zeus 13:33 on 17 Jun 2004

Re: abstract search count
Simon Cozens 14:20 on 17 Jun 2004

Re: abstract search count
Jean-Christophe Zeus 14:26 on 17 Jun 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52