docs: function(callback, options = {}) {
          if (this._order || this._skip || this._limit >= 0) {
            var error = new Error(
              'Cannot iterate on a query with sort, skip, or limit.'
            );
            return Promise.reject(error);
          }
  
          var query = new AV.Query(this.objectClass);
          // We can override the batch size from the options.
          // This is undocumented, but useful for testing.
          query._limit = options.batchSize || 100;
          query._where = _.clone(this._where);
          query._include = _.clone(this._include);
  
          query.ascending('objectId');
  
          var finished = false;
          return Promise._continueWhile(
            function() {
              return !finished;
            },
            function() {
              return query.find(options).then(function(results) {
                var callbacksDone = Promise.resolve();
                _.each(results, function(result) {
                  callbacksDone = callbacksDone.then(function() {
                    return callback(result);
                  });
                });
  
                return callbacksDone.then(function() {
                  if (results.length >= query._limit) {
                    query.greaterThan('objectId', results[results.length - 1].id);
                  } else {
                    finished = true;
                  }
                });
              });
            }
          );
        }