TinyBase logoTinyBase

getIndexIds

The getIndexIds method returns an array of the Index Ids registered with this Indexes object.

getIndexIds(): Ids
returnsIds

An array of Ids.

Example

This example creates an Indexes object with two definitions, and then gets the Ids of the definitions.

const indexes = createIndexes(createStore())
  .setIndexDefinition('bySpecies', 'pets', 'species')
  .setIndexDefinition('byColor', 'pets', 'color');

console.log(indexes.getIndexIds());
// -> ['bySpecies', 'byColor']