DBIx::Sequence

DBIx::Sequence is a simple SQL92 ID generator.
Download

DBIx::Sequence Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Benoit Beausejour
  • Publisher web site:
  • http://search.cpan.org/~bbeausej/DBIx-Sequence-1.5/Sequence.pm

DBIx::Sequence Tags


DBIx::Sequence Description

DBIx::Sequence is a simple SQL92 ID generator. DBIx::Sequence is a simple SQL92 ID generator.SYNOPSIS use DBIx::Sequence; my $sequence = new DBIx::Sequence({ dbh => $dbh }); my $next_id = $sequence->Next('dataset');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.INSTALLATION perl Makefile.PL make make test make installNote:If you decide to run extended tests for the module, you will have to provide the make test with a DSN (connect string) to your database (dbi:Driver:db;host=hostname) and a valid username/password combination for a privileged user.DBIx::Sequence uses 2 tables for its operation, namely the dbix_sequence_state and the dbix_sequence_release tables. Those tables will be created if you run extended tests, if not you will need to create them yourself. dbix_sequence_state: | dataset | varchar(50) | | state_id | int(11) | dbix_sequence_release: | dataset | varchar(50) | | released_id | int(11) | Those table names are overloadable at your convenience, see the OVERLOADING section for details. Requirements: · Perl


DBIx::Sequence Related Software