Re: dbd_db_last_insert_id in 1.42

2004-08-23 Thread Matt Sergeant
On Mon, 23 Aug 2004, Tim Bunce wrote:

> #ifndef no_last_insert_id
> #define dbd_db_last_insert_id sqlite_db_last_insert_id
> #endif
>
> pass a -Dno_last_insert_id to the compiler is using DBI 1.42.

OK, I've done that. (and uploaded DBD::SQLite 1.04 to cpan).

-- 

<:->get a SMart net
I am Jack's broken heart.


Re: dbd_db_last_insert_id in 1.42

2004-08-23 Thread Tim Bunce
On Mon, Aug 23, 2004 at 11:54:04AM +0100, Matt Sergeant wrote:
> There was a change in prototype for dbd_db_last_insert_id in 1.43.
> 
> How should DBD developers handle this change in their code?

(last_insert_id was fairly broken until 1.43.)

The simplest way is just to have the Makefile.PL check if the installed
DBI is 1.42 and if so croak with a message suggesting they upgrade.

Or, assuming you have a line line this in your .h file:

#define dbd_db_last_insert_id sqlite_db_last_insert_id

you could change that to

#ifndef no_last_insert_id
#define dbd_db_last_insert_id sqlite_db_last_insert_id
#endif

pass a -Dno_last_insert_id to the compiler is using DBI 1.42.

Sadly the DBI doesn't define a C preprocessor macro giving the version.
I'll add this to the DBI v2 ToDo.

Tim.


dbd_db_last_insert_id in 1.42

2004-08-23 Thread Matt Sergeant
There was a change in prototype for dbd_db_last_insert_id in 1.43.

How should DBD developers handle this change in their code?

-- 

<:->get a SMart net
I am Jack's broken heart.