I am executing breeze queries for my entities and storing the data in browser local cache. If I happen to load these entities in future, instead of executing the breeze query again I am loading the data from local storage into observable arrays. I was wondering how can I filter data in these observable arrays by applying breeze predicates since I won't be executing breeze queries again.
Is it possible to apply breeze predicates on an observable array to filter data ?
Breeze has the ability to execute your query locally. For this to work you'll need to load the data from local storage into a breeze entity manager. There are several ways to do this (importEntities, attachEntity), the approach depends on how you are storing and retrieving your entities from local storage. It would make your life easier if you used exportEntities and importEntities when storing/retrieving entity data from local storage. If you do choose to use exportEntites, pay careful attention to the includeMetadata
argument. You may want to cache the metadata separately to save space.