@@ -307,18 +307,15 @@ Query.prototype.offset = function(n) {
307307/**
308308 * Run the query.
309309 *
310+ * @param {object= } options - Optional configuration.
311+ * @param {string } options.consistency - Specify either `strong` or `eventual`.
312+ * If not specified, default values are chosen by Datastore for the
313+ * operation. Learn more about strong and eventual consistency
314+ * [here](https://cloud.google.com/datastore/docs/articles/balancing-strong-and-eventual-consistency-with-google-cloud-datastore).
310315 * @param {function= } callback - The callback function. If omitted, a readable
311316 * stream instance is returned.
312317 * @param {?error } callback.err - An error returned while making this request
313- * (may be null).
314- * @param {array } callback.entities - The list of entities returned by this
315- * query. Note that this is a single page of entities, not necessarily
316- * all of the entities.
317- * @param {?module:datastore/query } callback.nextQuery - If present, run another
318- * query with this object to check for more results.
319- * @param {object } callback.apiResponse - The full API response.
320- * @param {?error } callback.err - An error returned while making this request
321- * @param {module:datastore/entity[] } callback.entities - A list of Entities
318+ * @param {object[] } callback.entities - A list of entities.
322319 * @param {?object } callback.nextQuery - If present, query with this object to
323320 * check for more results.
324321 * @param {object } callback.apiResponse - The full API response.
@@ -372,8 +369,11 @@ Query.prototype.offset = function(n) {
372369 * // entities[].data = Empty object
373370 * });
374371 */
375- Query . prototype . run = function ( callback ) {
376- return this . scope . runQuery ( this , callback ) ;
372+ Query . prototype . run = function ( ) {
373+ var query = this ;
374+ var args = [ query ] . concat ( [ ] . slice . call ( arguments ) ) ;
375+
376+ return this . scope . runQuery . apply ( this . scope , args ) ;
377377} ;
378378
379379module . exports = Query ;
0 commit comments