PHP Класс Pheasant\Database\Mysqli\SequencePool

Показать файл Открыть проект

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
_lockSequence ( $sequence ) Locks the sequence, creates it if needed and returns the current value

Описание методов

__construct() публичный Метод

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

_nextSequence() публичный Метод

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

clear() публичный Метод

Clears either the whole pool
public clear ( )

close() публичный Метод

Closes a connection
public close ( )

current() публичный Метод

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

delete() публичный Метод

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

initialize() публичный Метод

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

next() публичный Метод

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