@@ -80,8 +80,8 @@ function _findAll(resourceName, params, options) {
8080 * @id DS.async_methods:findAll
8181 * @name findAll
8282 * @description
83- * Asynchronously return the resource from the server filtered by the query. The results will be added to the data
84- * store when it returns from the server .
83+ * The "R" in "CRUD". Delegate to the `findAll` method of whichever adapter is being used (http by default) and inject
84+ * the resulting collection into the data store .
8585 *
8686 * ## Signature:
8787 * ```js
@@ -91,46 +91,44 @@ function _findAll(resourceName, params, options) {
9191 * ## Example:
9292 *
9393 * ```js
94- * var params = {
95- * where: {
96- * author: {
97- * '==': 'John Anderson'
98- * }
99- * }
100- * };
94+ * var params = {
95+ * where: {
96+ * author: {
97+ * '==': 'John Anderson'
98+ * }
99+ * }
100+ * };
101101 *
102- * DS.findAll('document', params).then(function (documents) {
103- * documents; // [{ id: '1', author: 'John Anderson', title: 'How to cook' },
104- * // { id: '2', author: 'John Anderson', title: 'How NOT to cook' }]
102+ * DS.filter('document', params); // []
103+ * DS.findAll('document', params).then(function (documents) {
104+ * documents; // [{ id: '1', author: 'John Anderson', title: 'How to cook' },
105+ * // { id: '2', author: 'John Anderson', title: 'How NOT to cook' }]
105106 *
106- * // The documents are now in the data store
107- * DS.filter('document', params); // [{ id: '1', author: 'John Anderson', title: 'How to cook' },
108- * // { id: '2', author: 'John Anderson', title: 'How NOT to cook' }]
109- *
110- * }, function (err) {
111- * // handle error
112- * });
107+ * // The documents are now in the data store
108+ * DS.filter('document', params); // [{ id: '1', author: 'John Anderson', title: 'How to cook' },
109+ * // { id: '2', author: 'John Anderson', title: 'How NOT to cook' }]
110+ * });
113111 * ```
114112 *
115113 * @param {string } resourceName The resource type, e.g. 'user', 'comment', etc.
116- * @param {object= } params Parameter object that is serialized into the query string. Properties :
114+ * @param {object= } params Parameter object that is serialized into the query string. Default properties :
117115 *
118116 * - `{object=}` - `where` - Where clause.
119117 * - `{number=}` - `limit` - Limit clause.
120118 * - `{number=}` - `skip` - Skip clause.
121119 * - `{number=}` - `offset` - Same as skip.
122120 * - `{string|array=}` - `orderBy` - OrderBy clause.
123121 *
124- * @param {object= } options Optional configuration. Properties:
122+ * @param {object= } options Optional configuration. Also passed along to the adapter's `findAll` method. Properties:
125123 *
126124 * - `{boolean=}` - `bypassCache` - Bypass the cache. Default: `false`.
127- * - `{boolean=}` - `cacheResponse` - Inject the data returned by the server into the data store. Default: `true`.
125+ * - `{boolean=}` - `cacheResponse` - Inject the data returned by the adapter into the data store. Default: `true`.
128126 *
129127 * @returns {Promise } Promise produced by the `$q` service.
130128 *
131129 * ## Resolves with:
132130 *
133- * - `{array}` - `items` - The collection of items returned by the server .
131+ * - `{array}` - `items` - The collection of items returned by the adapter .
134132 *
135133 * ## Rejects with:
136134 *
0 commit comments