GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Recordset::DBSeq(3) User Contributed Perl Documentation Recordset::DBSeq(3)

DBIx::Recordset::DBSeq - Sequence generator in DBI database

 use DBIx::Recordset::DBSeq ;

 $self = DBIx::Recordset::DBSeq ($dbh, 'sequences', $min, $max) ;
 
 $val1 = $self -> NextVal ('foo') ;
 $val2 = $self -> NextVal ('foo') ;
 $val3 = $self -> NextVal ('bar') ;

DBIx::Recordset::FileSeq generates unique numbers. State is kept in the one table of a database accessable via DBI. With the new constructor you give an open database handle and sepcify the the table where state should be kept. Optionaly you can give a min and a max values, which will be used for new sequences.

With NextVal you can get the next value for the sequence of the given name.

The table must created in the following form:

create table ( name varchar (32), cnt integer, maxcnt integer, primary key name ) ;

If the sequence value reaches the maxcnt value, NextVal will die with an error message. If maxcnt contains "null" there is no limit.

G.Richter (richter@dev.ecos.de)

DBIx::Recordset

Hey! The above document had some coding errors, which are explained below:
Around line 161:
'=item' outside of any '=over'

=over without closing =back

2003-11-22 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.