[Catalyst] CDBI/Pager problems
Dylan Vanderhoof
DylanV at semaphore.com
Wed Jan 11 08:12:18 CET 2006
Interesting. I'll give CDBI::Sweet a shot and see what I can do. The -nest being unsupported would explain a good deal.
Can I make some of the more low-level calls with CDBI::Sweet? Or rather, does it expose the lower level Class::DBI methods?
-----Original Message-----
From: Todd Holbrook [mailto:paradawks at gmail.com]
Sent: Tuesday, January 10, 2006 7:36 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] CDBI/Pager problems
I'll second the switch to CDBI::Sweet if you can't make the jump to DBIx::Class. I was trying to use Class::DBI::Plugin::Pager with a "-nest" clause (see SQL::Abstract) to do something similar to what you need, however CDBI::Plugin::Pager does not support "-nest" and doesn't seem to have been updated yet (I reported it to the author). The switch to CDBI::Sweet was painless and I'm now making use of other CDBI::Sweet features as well.
On 1/10/06, Matt S Trout < dbix-class at trout.me.uk> wrote:
On Tue, Jan 10, 2006 at 05:57:57PM -0800, Dylan Vanderhoof wrote:
> Not sure if this is the right place to ask, but it seems the most likely
> place to get an answer. Trying to figure out some problems with
> CDBI::Plugin::Pager, specifically a complicated where clause.
>
> I can do things like WHERE foo LIKE 'bar%' OR foo LIKE 'baz%', etc...
>
> What I'm trying to arrive at is:
>
> WHERE foo LIKE 'bar%' OR foo LIKE 'baz%' OR (foo LIKE 'bar%' AND foo
> LIKE 'bat%')
>
> I can't seem to figure out how to get that AND subquery in there. Any
> help would be much appreciated! I've been tinkering with my stupid
> where hash for an hour or so without any appreciable progress.
use base qw/Class::DBI::Sweet/;
or better still DBIx::Class :)
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ <http://dbix-class.shadowcatsystems.co.uk/> +
_______________________________________________
Catalyst mailing list
Catalyst at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst
Todd
--
Todd Holbrook
Systems Consultant
Simon Fraser University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060110/e814a80f/attachment-0001.htm
More information about the Catalyst
mailing list