js/libs/ember-data.js
function(type, query) {
    type = this.modelFor(type);

    var array = this.recordArrayManager
      .createAdapterPopulatedRecordArray(type, query);

    var adapter = this.adapterFor(type),
        promiseLabel = "DS: Store#findQuery " + type,
        resolver = Ember.RSVP.defer(promiseLabel);

    Ember.assert("You tried to load a query but you have no adapter (for " + type + ")", adapter);
    Ember.assert("You tried to load a query but your adapter does not implement `findQuery`", adapter.findQuery);

    resolver.resolve(_findQuery(adapter, this, type, query, array));

    return promiseArray(resolver.promise);
  }
function(type, query) {
    type = this.modelFor(type);

    var array = this.recordArrayManager
      .createAdapterPopulatedRecordArray(type, query);

    var adapter = this.adapterFor(type),
        promiseLabel = "DS: Store#findQuery " + type,
        resolver = Ember.RSVP.defer(promiseLabel);

    Ember.assert("You tried to load a query but you have no adapter (for " + type + ")", adapter);
    Ember.assert("You tried to load a query but your adapter does not implement `findQuery`", adapter.findQuery);

    resolver.resolve(_findQuery(adapter, this, type, query, array));

    return promiseArray(resolver.promise);
  }
This method delegates a query to the adapter. This is the one place where
adapter-level semantics are exposed to the application.

Exposing queries this way seems preferable to creating an abstract query
language for all server-side queries, and then require all adapters to
implement them.

This method returns a promise, which is resolved with a `RecordArray`
once the server returns.

@method findQuery
@private
@param {String or subclass of DS.Model} type
@param {any} query an opaque query to be used by the adapter
@return {Promise} promise