Re: [CDBI] Sharing Queries with set_sql

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

From: Matt S Trout
Subject: Re: [CDBI] Sharing Queries with set_sql
Date: 15:45 on 06 Sep 2005
On Tue, Sep 06, 2005 at 04:21:15PM +0100, William Ross wrote:
> If it's about returning values from more than one table and  
> generating reports from within cdbi classes, the usual answer is  
> 'don't: it's not the right tool'. Do it at the template level, and if  
> that's too inefficient then write a custom reporting class: cdbi  
> becomes slippery and awkward if you don't stick to the simple  
> correspondences it expects.

And if you're worried about the query overhead, use Class::DBI::Sweet's
prefetch feature to do a JOINed SELECT that populates has_a and might_have
relations from a single query.

        -- 
             Matt S Trout       Specialists in perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

[CDBI] Sharing Queries with set_sql
Tom Adamo 14:33 on 06 Sep 2005

Re: [CDBI] Sharing Queries with set_sql
William Ross 15:21 on 06 Sep 2005

Re: [CDBI] Sharing Queries with set_sql
Matt S Trout 15:45 on 06 Sep 2005

Generated at 10:29 on 10 Oct 2005 by mariachi v0.52