Re: [CDBI] Re: DBI's last_insert_id and Class::DBI's _auto_increment_value

[prev] [thread] [next] [Date index for 2005/11/22]

From: Matt S Trout
Subject: Re: [CDBI] Re: DBI's last_insert_id and Class::DBI's _auto_increment_value
Date: 16:51 on 22 Nov 2005
On Mon, Nov 21, 2005 at 10:49:05PM -0500, Edward J. Sabol wrote:
> David Steinbrunner wrote:
> > It seems to me that using last_insert_id in the _auto_increment_value
> > method would not only clean up the code for that method but make it so that
> > you would not have to define a sequence and be more database agnostic.
> 
> I completely agree with you. Tim Bunce brought up this same issue on the old
> Class::DBI mailing, and I thought he had convinced Tony Bowden to change the
> _auto_increment_value code to use DBI's last_insert_id, but it appears Tony
> Bowden never implemnted the change.

I can't say I'm overly surprised; I tried to use last_insert_id for
auto-increment columns in DBIx::Class and ran into a widely varying level
of support from different DBDs - with the result that DBIx::Class requires
the loading of an auto-PK plugin for the appropriate DB (although one of
us *will* get round to guessing it off the DBD at some point :)

        -- 
             Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

Re: [CDBI] Re: DBI's last_insert_id and Class::DBI's _auto_increment_value
Matt S Trout 16:51 on 22 Nov 2005

Generated at 19:11 on 22 Dec 2005 by mariachi v0.52