[CDBI] Class::DBI vs DBIx::Class

Matt S Trout dbix-class at trout.me.uk
Tue Jan 17 18:40:26 GMT 2006


On Tue, Jan 17, 2006 at 11:42:05AM -0500, Perrin Harkins wrote:
> On Tue, 2006-01-17 at 16:15 +0000, Matt S Trout wrote:
> > - Multi-col primary key support natively from the start
> >     (although CDBI is much better these days, I think there are still gotchas)
> 
> AFAIK, the only thing missing from multi-column key support in CDBI is
> relationships (has_a/many) using multi-column keys.
> 
> > - Objects don't end up being isa DBI
> 
> CDBI objects don't inherit from DBI.  They do inherit from the
> confusingly-named Ima::DBI, which does not actually inherit from DBI.

Hmm. I'm sure Ima::DBI did something odd at one point in its life. Tony
may have changed that, or my memory could be blurred.

The fact that it's impossible to make Class::DBI use ->prepare instead of
->prepare_cached without re-declaring every single damn set_sql it uses is
probably what my addled brain was getting at.
 
> Does DBIx::Class work with non-subclasses DBI handles (as opposed to the
> DBIx::ContextualFetch handles that CDBI requires)?  If so, I would
> consider that a point in its favor.

Storage::DBI just uses a plain DBI handle. When more Storage modules are
released, they may or may not require a subclass (or indeed may or may not
use DBI; DBIx::Threaded, Net::LDAP and Rosetta are I suspect the most likely
candidates for alternative Storage classes).

-- 
     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/ +




More information about the ClassDBI mailing list