Re: Class::DBI _auto_increment_value update/suggestion

[prev] [thread] [next] [Date index for 2005/06/26]

From: Tony Bowden
Subject: Re: Class::DBI _auto_increment_value update/suggestion
Date: 09:35 on 26 Jun 2005
On Thu, Jun 23, 2005 at 10:28:51PM +0100, Tim Bunce wrote:
> > >    my $id  = $dbh->last_insert_id(undef, undef, $self->table, undef );
> > Tim, does this sound like a good idea?
> Yes, though "most DB drivers already handle it" may be a little optimistic.
> It returns undef "if the driver does not support the method or can't
> determine the value" so if you get an undef you're no worse off than before.

Well, we're worse off than before if we actually replace the code that
does the specific calls to MySQL and SQLite with the generic version,
and they break. 

I can't make the specific DBD versions of MySQL and SQLite be pre-reqs, as
they're not required at all. But it might be worth noting in the docs
that people will need certain versions if they're using those databases
and want to use auto-incrementing PKs?

Tony

Re: Class::DBI _auto_increment_value update/suggestion
Tony Bowden 09:35 on 26 Jun 2005

Generated at 16:35 on 28 Jul 2005 by mariachi v0.52