[Catalyst] More complex Class::DBI::Sweet usage?

Perrin Harkins perrin at elem.com
Sat Jul 2 03:37:32 CEST 2005


On Sat, 2005-07-02 at 01:24 +0100, Matt S Trout wrote:
> The 0.03 release of Class::DBI::Sweet can currently only auto-join by one
> step (i.e. to tables related directly to the current one), so for the
> moment I think you're correct[0].
> 
> If you were looking to connect across only 3 tables though, I'd say use
> Sweet - with the ActiveRecord-:include-style prefetch facility it provides 
> it's far less hassle than messing about with set_sql.
> 
> [0] I'm going to do arbitrary-step auto-joins as soon as I have time. Watch
> This Space (and CPAN :)

You can use SQL::Abstract queries already.  Personally, I find them much
harder than the equivalent SQL, but SQL::Abstract is handy when you want
to build the query dynamically.

If you're trying to get results that don't correspond to a single table,
I would avoid Class::DBI for that part.

- Perrin




More information about the Catalyst mailing list