code: @Override
      public final Object singleResult(DBCollection dbCollection) {
          MapReduceOutput output = dbCollection.mapReduce(createMapFunction(), createReduceFunction(), null, query);
          Iterable<DBObject> results = output.results();
  
          try {
              return transformToValue(results);
          } finally {
              output.drop();
          }
      }
docs: -------------------------------------------------------------