IndexDefinition
final class IndexDefinition (View source)
Provides the index definition contract for the database subsystem.
Methods
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Provides this part of the database contract while preserving the object's current state and driver semantics.
Updates the query or object state used by subsequent database operations.
Resolves the effective value from the configured database dependencies and input.
Details
__construct
__construct(IndexType $type, array $columns, string|null $name = null, bool $ifNotExists = false)
No description
primary
static IndexDefinition
primary(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
index
static IndexDefinition
index(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
unique
static IndexDefinition
unique(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
fulltext
static IndexDefinition
fulltext(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
spatial
static IndexDefinition
spatial(string|array $columns, string|null $name = null, bool $ifNotExists = false)
No description
type
IndexType
type()
Provides this part of the database contract while preserving the object's current state and driver semantics.
columns
array
columns()
No description
name
string|null
name()
Provides this part of the database contract while preserving the object's current state and driver semantics.
ifNotExists
bool
ifNotExists()
Provides this part of the database contract while preserving the object's current state and driver semantics.
withIfNotExists
IndexDefinition
withIfNotExists(bool $ifNotExists = true)
Updates the query or object state used by subsequent database operations.
resolvedName
string
resolvedName()
Resolves the effective value from the configured database dependencies and input.