DBIndexable
interface DBIndexable
Classes that implement the DBIndexable interface will provide options to set various index types and index contents, which will be processed by {@link \SilverStripe\ORM\DataObjectSchema}
Constants
TYPE_INDEX |
Index types that can be used. Please check your database driver to ensure choices are supported. |
TYPE_UNIQUE |
|
TYPE_FULLTEXT |
|
TYPE_DEFAULT |
If "true" is provided to setIndexType, this default index type will be returned |
Methods
Set the desired index type to use
Return the desired index type to use. Will return false if the field instance should not be indexed.
Returns the index specifications for the field instance, for example:
Details
at line 35
$this
setIndexType($type)
Set the desired index type to use
at line 42
string|bool
getIndexType()
Return the desired index type to use. Will return false if the field instance should not be indexed.
at line 56
array
getIndexSpecs()
Returns the index specifications for the field instance, for example:
[
'type' => 'unique',
'columns' => ['FieldName']
]