getStore
The getStore
method returns a reference to the underlying Store
that is backing this Indexes
object.
getStore(): Store
Example
This example creates an Indexes
object against a newly-created Store
and then gets its reference in order to update its data.
import {createIndexes, createStore} from 'tinybase';
const indexes = createIndexes(createStore());
indexes.setIndexDefinition('bySpecies', 'pets', 'species');
indexes.getStore().setCell('pets', 'fido', 'species', 'dog');
console.log(indexes.getSliceIds('bySpecies'));
// -> ['dog']
Since
v1.0.0