getTableId
The getTableId
method returns the Id
of the underlying Table
that is backing an Index
.
getTableId(indexId: Id): any
Type | Description | |
---|---|---|
indexId | Id | |
returns | any |
If the Index
Id
is invalid, the method returns undefined
.
Example
This example creates an Indexes
object, a single Index
definition, and then queries it (and a non-existent definition) to get the underlying Table
Id
.
const indexes = createIndexes(createStore());
indexes.setIndexDefinition('bySpecies', 'pets', 'species');
console.log(indexes.getTableId('bySpecies'));
// -> 'pets'
console.log(indexes.getTableId('byColor'));
// -> undefined