Re: abstract search count
[prev]
[thread]
[next]
[Date index for 2004/06/16]
On Jun 14, 2004, at 6:15 PM, Jim Helm wrote:
> 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=20
> 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=20
> 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=3D354690
>
> 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=3D356028
>
> 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?
Hi Jim,
Seems like no one is interested in our efforts. :-(
So we now have the following situation: there are now 3 (in words:=20
three) plugins that do very similar things, and contain very similar=20
code:
Class::DBI::AbstractSearch: allow where clauses =E0 la SQL::Abstract,
Class::DBI::Plugin::CountSearch: allow count queries without having to=20=
iterate,
Class::DBI::Plugin::AbstractCount: combination of the two.
As there was absolutely no feedback from this list (except your mail,=20
of course), I uploaded the latter to CPAN, but without confidence that=20=
what I did was actually useful to anyone but me...
You wrote about subclassing AbstractSearch, but I'm not sure if that=20
makes sense.
What about one abstract plugin (i.e. without any methods) that all the=20=
others inherit from, thereby making writing plugins easier? I will=20
think this through, and if it really makes sense, I'll do it.
--=20
J.-C Zeus (mail@xxxxxx.xxx)
|
(message missing)
|