CreateIndexDefinitionItem extends AbstractCreateDefinitionItem

Syntax node to structure an index definition.

Table of Contents

Properties

$columnNames  : array<string|int, IndexColumnName>
$indexName  : Identifier|null
$indexType  : string
Use a special index type (MySQL: BTREE | HASH)
$isFulltext  : bool
Create a fulltext index
$isPrimary  : bool
Create the primary key
$isSpatial  : bool
Create a spatial (geo) index
$isUnique  : bool
Create a unique index
$name  : string
The index name
$options  : array<string|int, mixed>
Index options KEY_BLOCK_SIZE, USING, WITH PARSER or COMMENT

Methods

__construct()  : mixed
CreateIndexDefinitionItem constructor.

Properties

$indexType

Use a special index type (MySQL: BTREE | HASH)

public string $indexType = ''

$isFulltext

Create a fulltext index

public bool $isFulltext = false

$isPrimary

Create the primary key

public bool $isPrimary = false

$isSpatial

Create a spatial (geo) index

public bool $isSpatial = false

$isUnique

Create a unique index

public bool $isUnique = false

$name

The index name

public string $name = ''

$options

Index options KEY_BLOCK_SIZE, USING, WITH PARSER or COMMENT

public array<string|int, mixed> $options = []

Methods

__construct()

CreateIndexDefinitionItem constructor.

public __construct([Identifier|null $indexName = null ][, bool $isPrimary = false ][, bool $isUnique = false ][, bool $isSpatial = false ][, bool $isFulltext = false ]) : mixed
Parameters
$indexName : Identifier|null = null
$isPrimary : bool = false
$isUnique : bool = false
$isSpatial : bool = false
$isFulltext : bool = false

        
On this page

Search results