addHasIndexListener
The addHasIndexListener method registers a listener function with the Indexes object that will be called whenever an Index definition is added or removed.
addHasIndexListener(
indexId: IdOrNull,
listener: HasIndexListener,
): string| Type | Description | |
|---|---|---|
indexId | IdOrNull | |
listener | HasIndexListener | The function that will be called whenever the |
| returns | string | A unique |
You can either listen to a single Index (by specifying the Index Id as the method's first parameter), or changes to any Index (by providing a null wildcard).
The provided listener is a HasIndexListener function, and will be called with a reference to the Indexes object, the Id of the Index that changed, and whether it now exists.
Since
v9.1.0