Sequence
Less than 1 minute
Sequence
Trait providing sequence management methods for SQL-based DBI drivers.
trait SequenceIncludes default implementations for listing, checking, describing, creating, dropping, and manipulating sequences.
Methods
listSequences
public listSequences(): arrayReturns: array
sequenceExists
Check if a sequence exists by name.
public sequenceExists(string $sequenceName): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$sequenceName | string | the name of the sequence to check |
describeSequence
public describeSequence(string $name): array|falseReturns: array|false
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string |
createSequence
public createSequence(string $name, array $sequenceInfo, bool $ifNotExists): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$sequenceInfo | array | |
$ifNotExists | bool |
dropSequence
Attempt to drop a sequence by name.
public dropSequence(string $name, bool $ifExists): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the sequence to drop |
$ifExists | bool | if true, do not error if the sequence does not exist |
nextSequenceValue
Get the next value from a sequence.
public nextSequenceValue(string $name): false|intReturns: false|int
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the sequence |
setSequenceValue
Set the current value of a sequence.
public setSequenceValue(string $name, int $value): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | the name of the sequence |
$value | int | the value to set the sequence to |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000