IIndex
in
Object representation of an index.
Tags
Attributes
- #[Consumable]
- $since: '35.0.0'
Table of Contents
Methods
- getColumns() : array<int, string>
- Returns the names of the columns this index is defined on.
- getName() : non-empty-string
- Returns the name of this index.
- hasColumnAtPosition() : bool
- Returns whether this index has a column at a specified position.
- isPrimary() : bool
- Returns whether this index is the primary key.
- isSimpleIndex() : bool
- Returns whether this index is neither unique nor the primary key.
- isUnique() : bool
- Returns whether this index is a unique index.
- spansColumns() : bool
- Returns whether the given column names exactly match the columns this index spans, regardless of order.
Methods
getColumns()
Returns the names of the columns this index is defined on.
public
getColumns() : array<int, string>
Tags
Return values
array<int, string>getName()
Returns the name of this index.
public
getName() : non-empty-string
Tags
Return values
non-empty-stringhasColumnAtPosition()
Returns whether this index has a column at a specified position.
public
hasColumnAtPosition(non-empty-lowercase-string $name[, int $position = 0 ]) : bool
Parameters
- $name : non-empty-lowercase-string
- $position : int = 0
Tags
Return values
boolisPrimary()
Returns whether this index is the primary key.
public
isPrimary() : bool
Tags
Return values
boolisSimpleIndex()
Returns whether this index is neither unique nor the primary key.
public
isSimpleIndex() : bool
Tags
Return values
boolisUnique()
Returns whether this index is a unique index.
public
isUnique() : bool
Tags
Return values
boolspansColumns()
Returns whether the given column names exactly match the columns this index spans, regardless of order.
public
spansColumns(array<int, non-empty-lowercase-string> $columnNames) : bool
Parameters
- $columnNames : array<int, non-empty-lowercase-string>