NAME

SPOPS::DBI::Keypool -- Retrieves ID field information from a pool

SYNOPSIS

package MySPOPS;

@MySPOPS::ISA = qw( SPOPS::DBI::Keypool SPOPS::DBI );

DESCRIPTION

This module retrieves a value from a pool of key values matched up to tables. It is not as fast as IDENTITY fields, auto_incrementing values or sequences, but it is portable among databases and, most importantly, works in a replicated environment. It also has the benefit of being fairly simple to understand.

Currently, the key fetching procedure is implemented via a stored procedure for portability among tools in different languages, but it does not have to remain this way. It is perfectly feasible to program the entire procedure in perl.

BUGS

Put this class before others in ISA

Not really a bug, but you must put this class before any database-specific ones in your @ISA, otherwise you will not see the results of this class and likely get very confused.

TO DO

Make option for perl implementation

Allow authors to use a perl implementation of a key pool rather than relying on a stored procedure (particularly for those databases without stored procedures...).

COPYRIGHT

Copyright (c) 2001 intes.net, inc.. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>