__endProcessor__(err, r, callback) {

    if (!r || !r.countResult || !r.result) {
      throw new Error('End Query Expects object containing "count" and "results"');
    }

    let limitCommand = this.__getLastLimitCommand__(this.__collapse__());
    let offset = limitCommand ? limitCommand._command.data.offset : 0;

    let total = (((r.countResult && r.countResult.rows) || [])[0] || {}).__total__ || 0;
    let rows = r.result ? (r.result.rows || []).slice() : [];
    let models = this.__parseModelsFromRows__(rows, this.__isGrouped__());

    if (r.updateResult && r.updateResult.rows) {

      let cache = r.updateResult.rows.reduce((cache, obj) => {
        cache[obj.id] = obj;
        return cache;
      }, {});

      models.forEach(m => {
        let data = cache[m.get('id')];
        data && m.read(data);
      });

    }

    models.setMeta({offset: offset, total: total});
    callback.call(this, err, models);

  }
Processes results and errors from a terminal call
@private