in reply to portable mysql auto_increment
You might want to take a look at DBIx::Sequence, which does a similar thing to what you want in a vaguely cross-platform way.
From the pod...
This module is intended to give easier portability to Perl database application by providing a database independant unique ID generator. This way, an application developer is not bound to use his database's SEQUENCE or auto_increment thus making his application portable on multiple database environnements.
This module implements a simple Spin Locker mechanism and is garanteed to return a unique value every time it is called, even with concurrent processes. It uses your database for its state storage with ANSI SQL92 compliant SQL. All SQL queries inside DBIx::Sequence are pre cached and very efficient especially under mod_perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: portable mysql auto_increment
by mpeppler (Vicar) on Oct 25, 2002 at 00:04 UTC | |
by adrianh (Chancellor) on Oct 25, 2002 at 14:19 UTC | |
by mpeppler (Vicar) on Oct 25, 2002 at 15:34 UTC | |
by adrianh (Chancellor) on Oct 26, 2002 at 17:51 UTC | |
by mpeppler (Vicar) on Oct 28, 2002 at 17:21 UTC |