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

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

From: Edward J. Sabol
Subject: [CDBI] Re: DBI's last_insert_id and Class::DBI's _auto_increment_value
Date: 03:49 on 22 Nov 2005
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.

Here's what I would suggest: File a Class::DBI bug report at
http://rt.cpan.org/ and attach a patch against Class::DBI v3.0.12 that
changes _auto_increment_value to use DBI's last_insert_id. You might want to
also include your test case because Tony loves test cases, but the CDBI test
suite doesn't run on PostgreSQL, so I don't know that it will be all that
useful to Tony. It will still give weight to your bug report, however.

Hope this helps,
Ed

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

(message missing)

[CDBI] Re: DBI's last_insert_id and Class::DBI's _auto_increment_value
Edward J. Sabol 03:49 on 22 Nov 2005

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