Re: Extend API for last_insert_id

[email protected] (Tim Bunce) Tue, 15 May 2018 21:12:19 +0100
Newsgroups perl.dbi.dev,perl.dbi.users
Message-ID <20180515201216.b5belo6jnkxkhz4c@timac>
On Fri, May 04, 2018 at 02:10:18PM +0200, [email protected] wrote:
> Hello, do you have any opinion or comments?
> 
> Tim, you as a DBI maintainer, what do you think about those ideas?
> 
> On Friday 27 April 2018 16:03:59 [email protected] wrote:
> > 
> > So I'm proposing change that caller would be allowed to call
> > $dbh->last_insert_id() without any argument

Ok.

> > Second change: Add a new statement method $sth->last_insert_id().

That seems fine. I'd write the fallback code like this:

    sub last_insert_id { return shift->{Database}->last_insert_id(@_) }

Thanks Pali.

Tim.