couchrest_model/lib/couchrest/helper/templates/example-reduce.js

10 lines
200 B
JavaScript
Raw Normal View History

2008-09-16 17:15:00 +02:00
// example reduce function to count the
// number of rows in a given key range.
function(keys, value, rereduce) {
if (rereduce) {
return sum(values);
} else {
return values.length;
}
};