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