Yes. Single Value selects are useful, but don't allow for parametric queries like AbstractSearch.
I was hoping there was already a builtin way to allow for COUNT(*) ... WHERE, but I couldn't see a way to do it natively, and a generic fashion for my whole class tree.
The ability to do other aggregates was just an afterthought when I started considering posting to CPAN.
If I've missed something in the base CDBI class, please, enlighten me. (I've already promised to peruse the rest of the CDBI namespace for something that does this - though I'm pretty sure I looked before embarking on this).
Update: Re: single value selects: I'd have to build the SQL myself for each variation of the where clause - which is where AbstractSearch came in, and the idea of a mixin/plugin to add things like count_where, min_where, etc, to my base class. I'm most definitely not trying to reinvent the wheel.
|