docs: function updateWhereClause(store, table, query) {
    let predicate = query.predicate;
  
    if (query.id) {
      if (!predicate) {
        predicate = new SimplePredicate('id', FilterOperator.Eq, query.id);
      } else {
        predicate = predicate.and(new SimplePredicate('id', FilterOperator.Eq, query.id));
      }
    }
  
    if (predicate instanceof GeographyPredicate) {
      Ember.warn('GeographyPredicate is not supported in indexedDB-adapter');
      return table;
    }
  
    if (predicate instanceof GeometryPredicate) {
      Ember.warn('GeometryPredicate is not supported in indexedDB-adapter');
      return table;
    }
  
    if (!predicate) {
      return table;
    }
  
    if (predicate instanceof SimplePredicate || predicate instanceof DatePredicate) {
      let information = new Information(store);
      let attrType = information.getType(query.modelName, predicate.attributePath);
      let value;
      switch (attrType) {
        case 'boolean':
          value = typeof predicate.value === 'boolean' ? `${predicate.value}` : predicate.value;
          break;
  
        case 'date':
          value = getSerializedDateValue.call(store, predicate.value, predicate.timeless);
          break;
  
        default:
          value = predicate.value;
      }
  
      if (value === null) {
        // IndexedDB (and Dexie) doesn't support null - use JS filter instead.
        // https://github.com/dfahlander/Dexie.js/issues/153
        let jsAdapter = predicate instanceof DatePredicate ? new JSAdapter(Ember.getOwner(store).lookup('service:moment')) : new JSAdapter();
  
        return table.filter(jsAdapter.getAttributeFilterFunction(predicate));
      }
  
      let moment;
      let nextValue;
      if (predicate.timeless) {
        moment = Ember.getOwner(store).lookup('service:moment');
        nextValue = moment.moment(value, 'YYYY-MM-DD').add(1, 'd').format('YYYY-MM-DD');
      }
  
      switch (predicate.operator) {
        case FilterOperator.Eq:
          return predicate.timeless ?
            table.where(predicate.attributePath).between(value, nextValue, false) :
            table.where(predicate.attributePath).equals(value);
  
        case FilterOperator.Neq:
          return predicate.timeless ?
            table.where(predicate.attributePath).below(value).or(predicate.attributePath).aboveOrEqual(nextValue) :
            table.where(predicate.attributePath).notEqual(value);
  
        case FilterOperator.Le:
          return table.where(predicate.attributePath).below(value);
  
        case FilterOperator.Leq:
          return predicate.timeless ?
            table.where(predicate.attributePath).below(nextValue) :
            table.where(predicate.attributePath).belowOrEqual(value);
  
        case FilterOperator.Ge:
          return predicate.timeless ?
            table.where(predicate.attributePath).aboveOrEqual(nextValue) :
            table.where(predicate.attributePath).above(value);
  
        case FilterOperator.Geq:
          return table.where(predicate.attributePath).aboveOrEqual(value);
  
        default:
          throw new Error('Unknown operator');
      }
    }
  
    if (predicate instanceof StringPredicate) {
      let jsAdapter = new JSAdapter();
      return table.filter(jsAdapter.getAttributeFilterFunction(predicate, { booleanAsString: true }));
    }
  
    if (predicate instanceof ComplexPredicate) {
      let datePredicates = predicate.predicates.filter(pred => pred instanceof DatePredicate);
      let jsAdapter = datePredicates.length > 0 ? new JSAdapter(Ember.getOwner(store).lookup('service:moment')) : new JSAdapter();
  
      return table.filter(jsAdapter.getAttributeFilterFunction(predicate, { booleanAsString: true }));
    }
  
    throw new Error(`Unsupported predicate '${predicate}'`);
  }