DBIndexable
interface DBIndexable (View source)
Classes that implement the DBIndexable interface will provide options to set various index types and index contents, which will be processed by \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
public
string|bool
getIndexType()
Return the desired index type to use. Will return false if the field instance should not be indexed.
Details
$this
setIndexType(string|bool $type)
Set the desired index type to use
string|bool
getIndexType()
Return the desired index type to use. Will return false if the field instance should not be indexed.
array
getIndexSpecs()
Returns the index specifications for the field instance, for example:
[
'type' => 'unique',
'columns' => ['FieldName']
]