beauby / jsonapi-datastore

JavaScript client-side JSON API data handling made easy.
MIT License
195 stars 40 forks source link

Add primary time range filter #37

Closed soloman1124 closed 7 years ago

soloman1124 commented 7 years ago

Enable syntax like:

Init JSONApi data with date range config

    let store = new JsonApiDataStore({
      timeRange: {
        Jobs: {
          field: 'effectiveDates',
          index: true
        },
        BusinessUnitJobs: 'effectiveDates'
      }
    });
    store.syncWithMeta(data);

Fetch json data with specified date range (overlapping)

this.data.findAllByTimeRange('People', start, end);