Re: Class::DBI::Plugin::Pager & Class::DBI::Plugin::CountSearch

[prev] [thread] [next] [Date index for 2005/04/06]

From: David Baird
Subject: Re: Class::DBI::Plugin::Pager & Class::DBI::Plugin::CountSearch
Date: 16:43 on 06 Apr 2005
On Wednesday 30 March 2005 14:38, Dave Howorth wrote:
> I've just patched Class::DBI::Plugin::Pager so it can use
> Class::DBI::Plugin::CountSearch instead of
> Class::DBI::Plugin::AbstractCount.
>
> I have large tables, so I wanted to use Plugin-Pager in my Maypole app.
> But I make use of CDBI's accessor_name functionality and AbstractCount
> doesn't handle that. OTOH, CountSearch does. So I've written a patch so
> Plugin-Pager will use either. I also implemented
> retrieve_all_sorted_by() for Maypole to call.
>
> The patch appears to work for me but has had next to no testing. I know
> there are some cases it doesn't handle but I don't know whether they
> occur in Maypole apps. I'm also not confident I understand either
> Plugin-Pager or the CDBI/database stuff well enough to write bug free
> code. But I thought it was best to post it so anybody who knows more can
> improve it :)

Sorry for the delay, I've been in perl version upgrade hell. And that's just 
on the development server. Thanks for the patches. I implemented them, and 
then had a look at what CountSearch does to handle aliases, and stole from 
there. I've just uploaded an experimental version (0.6_1) that figures out 
column aliases, and uses AbstractCount. Let me know if it works for you. I'm 
reasonably keen to continue with AbstractCount if possible, since it handles 
anything you can throw at SQL::Abstract. But if this new scheme doesn't work 
out, I'll put in the CountSearch patch. 

Cheers,

d.

Re: Class::DBI::Plugin::Pager & Class::DBI::Plugin::CountSearch
David Baird 16:43 on 06 Apr 2005

Generated at 14:42 on 11 Apr 2005 by mariachi v0.52