[CDBI] Class::DBI vs DBIx::Class
Matt S Trout
dbix-class at trout.me.uk
Tue Jan 17 19:00:47 GMT 2006
On Tue, Jan 17, 2006 at 01:44:08PM -0500, Perrin Harkins wrote:
> On Tue, 2006-01-17 at 18:40 +0000, Matt S Trout wrote:
> > 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.
> That might have been before DBIx::ContextualFetch was pulled out of it.
> I think that was part of Ima::DBI before.
That would make sense.
> > 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.
> Why wouldn't you want to use prepare_cached?
(1) dodgy DBD (DBD::AnyData, I hate you so much ...)
(2) because the way Ima::DBI uses it, it'll recycle a live sth you'd hung onto
because you weren't finished fetching data from it, thus screwing your app
up quite spectactularly. It only works for CDBI because CDBI fetches all
the data from the sth straight off and throws it away.
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