Optional
query: ComplexQueryExpressiona complex query expression
Optional
options: ComplexQueryOptions & SortOptions & PaginationOptionscomplex query, sort and paginate options.
A function which filters, sorts and paginates the given query result.
import { createComplexQueryEngine } from "store-api/utils";
class MyStore{
items = [{a:1},{b:2}];
query(complexQuery, options){
// filter, sort, paginate the items array
return createComplexQueryEngine(complexQuery,options)(this.items);
}
}
Generated using TypeDoc
This function creates a new function which can be used to implement a Store.query method by evaluating and filtering data available in an iterable, e.g. array.