PHP Class Pheasant\Database\Mysqli\SequencePool

Afficher le fichier Open project: lox/pheasant

Méthodes publiques

Méthode Description
__construct ( $connection, $startId = 1 ) Constructor
_nextSequence ( $sequence ) Called within a transaction, gets the next sequence value
clear ( ) Clears either the whole pool
close ( ) Closes a connection
current ( $sequence ) Returns the current integer in the sequence
delete ( $sequence ) Deletes a given sequence from the pool
initialize ( ) Creates the sequence table if it doesn't exist
next ( $sequence ) Returns the next integer in the sequence

Private Methods

Méthode Description
_lockSequence ( $sequence ) Locks the sequence, creates it if needed and returns the current value

Method Details

__construct() public méthode

Constructor
public __construct ( $connection, $startId = 1 )

_nextSequence() public méthode

Called within a transaction, gets the next sequence value
public _nextSequence ( $sequence )

clear() public méthode

Clears either the whole pool
public clear ( )

close() public méthode

Closes a connection
public close ( )

current() public méthode

Returns the current integer in the sequence
public current ( $sequence )

delete() public méthode

Deletes a given sequence from the pool
public delete ( $sequence )

initialize() public méthode

Creates the sequence table if it doesn't exist
public initialize ( )

next() public méthode

Returns the next integer in the sequence
public next ( $sequence )