[Catalyst] Mason + DBI + Catalyst?

Octavian Rasnita orasnita at gmail.com
Wed May 27 12:23:29 GMT 2009


From: "Marcello Romani" <mromani at ottotecnica.com>> Octavian Râsnita ha 
scritto:
>>> On Tue, May 26, 2009 at 01:37:40AM +0200, Daniel Carrera wrote:
>>>> >Being able to chain resultsets makes it much much easier than using
>>>> >straight SQL, and you write less code.  If you have a query you've
>>>> >constructed called $query, and lets say you now only want active
>>>> records
>>>> >you can do $query = $query->search({ active => 1 });  In this way you
>>>> >can filter many things incrementally.
>>>>
>>>> But is that efficient? It looks like you are getting MySQL to return 
>>>> the
>>>> entire data set and then making Perl filter it. That can't be 
>>>> efficient.
>>
>> Here it is a short code example that might appear in a controller:
>>
>> sub author : Local {
[snip]

> I think this example is very interesting and should end up into the wiki 
> somewhere!
>
> I think it can be a good selling point for DBIC, but I've not seen it 
> explained so well until now (but I admit I've not looked up the docs in a 
> while...)
>
> Thank you.
>
> -- 
> Marcello Romani

Ok, I will correct it (because I remember at least an error in it), test it 
and put it in a wiki.

Can anyone recommend a good place for a thing like this?

Octavian




More information about the Catalyst mailing list