[Catalyst] ActiveRecord for Perl

Matt S Trout dbix-class at trout.me.uk
Tue May 22 17:15:20 GMT 2007


On Tue, May 22, 2007 at 11:52:22AM -0400, John Goulah wrote:
> I agree with you, using DBIx for simple stuff is fine, but after a while raw
> SQL is sometimes nice to have.

Personally I find it worthwhile to reformulate queries in DBIC form - I find
complex queries are usually there for reporting purposes and being able to
filter, page etc. reports using the usual DBIC syntax is worth the effort of
doing the conversion.

But that may just be me :) - and what I'd really love to see is somebody
use one of the SQL parser modules on CPAN to allow a standalone query to
be backtracked into a resultset so you can get the best of both these
approaches; however nobody's stepped up to do it and there are things I
consider more of a priority for my own development time.

> But this is not so useful if you cant return it in object form.  (Want to be
> able to call functions/associations on that object).  CDBI does it with
> sth_to_objects, and there is a CDBI compatibility layer, but I cant seem to
> get it working correctly.

I've actually replied on the dbix-class list showing you how to do this in
pure DBIC - the CDBICompat layer should only ever be used for its intended
purpose, there are too many hacks in it to make the 'compatibility' part work.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list