final class IndexDefinition (View source)

Methods

__construct(IndexType $type, array $columns, string|null $name = null, bool $ifNotExists = false)
primary(string|array $columns, string|null $name = null, bool $ifNotExists = false)
index(string|array $columns, string|null $name = null, bool $ifNotExists = false)
unique(string|array $columns, string|null $name = null, bool $ifNotExists = false)
fulltext(string|array $columns, string|null $name = null, bool $ifNotExists = false)
spatial(string|array $columns, string|null $name = null, bool $ifNotExists = false)
IndexType
type()
IndexType
array
array
string|null
name()
string|null
bool
bool
withIfNotExists(bool $ifNotExists = true)
string
string

Details

__construct

__construct(IndexType $type, array $columns, string|null $name = null, bool $ifNotExists = false)

No description

Parameters

IndexType $type
array $columns
string|null $name
bool $ifNotExists

primary

static IndexDefinition primary(string|array $columns, string|null $name = null, bool $ifNotExists = false)

No description

Parameters

string|array $columns
string|null $name
bool $ifNotExists

Return Value

IndexDefinition

index

static IndexDefinition index(string|array $columns, string|null $name = null, bool $ifNotExists = false)

No description

Parameters

string|array $columns
string|null $name
bool $ifNotExists

Return Value

IndexDefinition

unique

static IndexDefinition unique(string|array $columns, string|null $name = null, bool $ifNotExists = false)

No description

Parameters

string|array $columns
string|null $name
bool $ifNotExists

Return Value

IndexDefinition

fulltext

static IndexDefinition fulltext(string|array $columns, string|null $name = null, bool $ifNotExists = false)

No description

Parameters

string|array $columns
string|null $name
bool $ifNotExists

Return Value

IndexDefinition

spatial

static IndexDefinition spatial(string|array $columns, string|null $name = null, bool $ifNotExists = false)

No description

Parameters

string|array $columns
string|null $name
bool $ifNotExists

Return Value

IndexDefinition

type

IndexType type()

No description

Return Value

IndexType

columns

array columns()

No description

Return Value

array

name

string|null name()

No description

Return Value

string|null

ifNotExists

bool ifNotExists()

No description

Return Value

bool

withIfNotExists

IndexDefinition withIfNotExists(bool $ifNotExists = true)

No description

Parameters

bool $ifNotExists

Return Value

IndexDefinition

resolvedName

string resolvedName()

No description

Return Value

string