getStore
The getStore
method returns a reference to the underlying Store
that is backing this Relationships
object.
getStore(): Store
Example
This example creates a Relationships
object against a newly-created Store
and then gets its reference in order to update its data.
import {createRelationships, createStore} from 'tinybase';
const relationships = createRelationships(createStore());
relationships.setRelationshipDefinition(
'petSpecies',
'pets',
'species',
'species',
);
relationships.getStore().setCell('pets', 'fido', 'species', 'dog');
console.log(relationships.getRemoteRowId('petSpecies', 'fido'));
// -> 'dog'
Since
v1.0.0