NAME
Persistence::ValueGenerator::SequenceGenerator - Unique value generator based on database sequence
CLASS HIERARCHY
Persistence::ValueGenerator
|
+----Persistence::ValueGenerator::SequenceGenerator
SYNOPSIS
use Persistence::ValueGenerator::SequenceGenerator;
my $generator = Persistence::ValueGenerator::SequenceGenerator->new(
entity_manager_name => $entity_manager_name,
name => 'pk_generator',
sequence_name => 'cust_seq',
allocation_size => 1,
);
$generator->nextval;
or
use Persistence::ValueGenerator::SequenceGenerator ':all';
my $generator = sequence_generator 'pk_generator' => (
entity_manager_name => $entity_manager_name,
sequence_name => 'cust_seq',
allocation_size => 1,
)
DESCRIPTION
Represents sequence generator that uses database sequcnce.
EXPORT
sequence_generator by ':all' tag.
ATTRIBUTES
- sequence_name
METHODS
- retrieve_next_value
-
Returns next value for the instance generator
- sequence_generator
-
Creates a new instance of Persistence::ValueGenerator::TableGenerator
SEE ALSO
COPYRIGHT AND LICENSE
The Persistence::ValueGenerator::SequenceGenerator module is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
AUTHOR
Adrian Witas, adrian@webapp.strefa.pl