destroy (name, id, opts) {
    opts || (opts = {})
    return Container.prototype.destroy.call(this, name, id, opts).then((result) => {
      const record = this.getCollection(name).remove(id, opts)

      if (opts.raw) {
        result.data = record
      } else {
        result = record
      }
      delete this._pendingQueries[name][id]
      delete this._completedQueries[name][id]
      return result
    })
  }
Wrapper for {@link Mapper#destroy}. Removes any destroyed record from the
in-memory store. Clears out any {@link SimpleStore#_completedQueries} entries
associated with the provided `id`.

@example
import { SimpleStore } from 'js-data';
import { HttpAdapter } from 'js-data-http';

const store = new SimpleStore();
store.registerAdapter('http', new HttpAdapter(), { default: true });

store.defineMapper('book');

store.add('book', { id: 1234, title: 'Data Management is Hard' });

// Since this example uses the http adapter, we'll get something like:
//
//   DELETE /book/1234
store.destroy('book', 1234).then(() => {
  // The book record is no longer in the in-memory store
  console.log(store.get('book', 1234)); // undefined

  return store.find('book', 1234);
}).then((book) {
  // The book was deleted from the database too
  console.log(book); // undefined
});

@fires SimpleStore#beforeDestroy
@fires SimpleStore#afterDestroy
@fires SimpleStore#remove
@method SimpleStore#destroy
@param {string} name Name of the {@link Mapper} to target.
@param {(string|number)} id Passed to {@link Mapper#destroy}.
@param {object} [opts] Passed to {@link Mapper#destroy}. See
{@link Mapper#destroy} for more configuration options.
@returns {Promise} Resolves when the destroy operation completes.
@since 3.0.0