couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "View Snippets" by JasonDavies
Date Sun, 04 Jan 2009 19:09:12 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by JasonDavies:
http://wiki.apache.org/couchdb/View_Snippets

The comment on the change is:
Spotted potential bug in this example and fixed it

------------------------------------------------------------------------------
  // Reduce function
  // Only produces meaningful output.customer_details if group_level >= 1
  function(keys, values, rereduce) {
-   var output = {total: 0, customer_details: null};
+   var output = {};
    if (rereduce) {
      for (idx in values) {
        if (values[idx].total !== undefined) {

Mime
View raw message