getQueryIds
The getQueryIds
method returns an array of the query Ids
registered with this Queries
object.
getQueryIds(): Ids
Example
This example creates a Queries
object with two definitions, and then gets the Ids
of the definitions.
import {createQueries, createStore} from 'tinybase';
const queries = createQueries(createStore())
.setQueryDefinition('dogColors', 'pets', ({select, where}) => {
select('color');
where('species', 'dog');
})
.setQueryDefinition('catColors', 'pets', ({select, where}) => {
select('color');
where('species', 'cat');
});
console.log(queries.getQueryIds());
// -> ['dogColors', 'catColors']
Since
v2.0.0