ArangoIndexesTrait
The collection→indexes registry consumed by the `doctor` action of `command:arangodb`, declared independently of the models: a map of collection name to its declared indexes ({@see IndexDefinition} or {@see IndexOptions} value objects, or raw definitions).
It complements the model-level AQL::INDEXES: because DoctorTrait::diagnose()
only reconciles a model's indexes when that model declares some, a collection
backed by several models (or by an index-less one) can keep its indexes in a
single authoritative place here instead of being split across — or duplicated
over — every model. doctor reconciles each entry once, by collection.
Supplied via the collectionIndexes init key
(ArangoCommandParam::COLLECTION_INDEXES).
Each value is the same AQL::INDEXES shape: a list of indexes (each an
IndexDefinition value object — e.g. an
InvertedIndex — an
IndexOptions value object, or a raw POST /_api/index body). As a
convenience a single value object is accepted in place of a one-element
list (a raw array always stays the list).
Tags
Table of Contents
Properties
- $collectionIndexes : array<string, IndexDefinition|IndexOptions|array<int, mixed>>
- The collection→indexes registry — `[ collectionName => IndexOptions[] ]` (a single {@see IndexDefinition} / {@see IndexOptions} value object is tolerated in place of a one-element list).
Properties
$collectionIndexes
The collection→indexes registry — `[ collectionName => IndexOptions[] ]` (a single {@see IndexDefinition} / {@see IndexOptions} value object is tolerated in place of a one-element list).
public
array<string, IndexDefinition|IndexOptions|array<int, mixed>>
$collectionIndexes
= []