Class dbseq

Description

DB seq class A class which allows the management and use of sequences.

Located in /query-defs.php (line 1064)

sqlquery
   |
   --dbquery
      |
      --dbseq
Variable Summary
Method Summary
 dbseq dbseq (string $sequencename)
 integer current_sequencevalue ([string $table = ""], [string $column = ""])
 integer next_sequencevalue ([string $table = ""], [string $column = ""])
 void set_sequencevalue (integer $newval, [string $table = ""], [string $column = ""])
Variables
Methods
Constructor dbseq (line 1076)

Create a new object to manage a sequence, optionally specifying the sequence name..

dbseq dbseq (string $sequencename)
  • string $sequencename: Name of the sequence to manage
current_sequencevalue (line 1104)

Get the current sequence value.

  • return: The current sequence value
integer current_sequencevalue ([string $table = ""], [string $column = ""])
  • string $table: Name of the table associated with this sequence
  • string $column: Name of the column associated with this sequence
next_sequencevalue (line 1093)

Get the next sequence value. We can optionally specify the table and

column associated with it. The requirement for these parameters is in fact implementation-specific. If your underlying database does not support named sequences, then you will probably have to nominate the table/column so that the low-level DB access module can do a MAX() to obtain the next value. If it does upport tham then you probably only need the sequence name as specified in the constructor.

  • return: The value of the next integer in this sequence
integer next_sequencevalue ([string $table = ""], [string $column = ""])
  • string $table: Name of the table associated with this sequence
  • string $column: Name of the column associated with this sequence
set_sequencevalue (line 1115)

Set a sequence value.

void set_sequencevalue (integer $newval, [string $table = ""], [string $column = ""])
  • integer $newval: New integer value to set sequence to
  • string $table: Name of the table associated with this sequence
  • string $column: Name of the column associated with this sequence

Inherited Methods

Inherited From dbquery

 dbquery::dbquery()
 dbquery::execute()
 dbquery::set_sql()
 dbquery::tidyup()

Inherited From sqlquery

 sqlquery::sqlquery()
 sqlquery::build()
 sqlquery::clear()
 sqlquery::fieldlist()
 sqlquery::from()
 sqlquery::groupby()
 sqlquery::into()
 sqlquery::limit()
 sqlquery::offset()
 sqlquery::orderby()
 sqlquery::rebuild()
 sqlquery::set()
 sqlquery::tables()
 sqlquery::where()

Documentation generated by phpDocumentor 1.3.0RC3