[CDBI] Class::DBI vs DBIx::Class
siracusa at mindspring.com
Wed Jan 18 01:12:48 GMT 2006
On 1/17/06 7:56 PM, Tim Bunce wrote:
> Class::DBI and DBIx::Class (and others) should probably be passing 3
> for the $if_active parameter. Set it and forget it.
I explored that a while ago (Rose::DB::Object passes 3 as you suggest), but
it still doesn't account for the situation where the db supports server-side
prepared statements and the schema changes between calls. I encountered
this in my benchmark suite, which creates and drops indexes as part of its
execution. Any statement that was prepare_cache()d server-side when the
indexes existed will fail if execute()d after the indexes are dropped.
So, unfortunately, there's no way to totally remove the need to manually
control the use of prepare_cached().
More information about the ClassDBI