diff options
author | Damien F. Katz <damien@apache.org> | 2008-07-29 18:23:42 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-07-29 18:23:42 +0000 |
commit | 34b12e7537d8bc020023c15bde9789d3bf29e8e1 (patch) | |
tree | 166dcc65354ef2e89e00a8f1b4e6fd30c39ad38c /share/www | |
parent | 69228815a04443a7a9063a75608117c674a9a822 (diff) |
Fix for problem with count query arg in grouped reduce views. Previous fix would keep enumerating over subsequent view results despite not returning them.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@680796 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/couch_tests.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index 28afeaa9..0308ed8d 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -290,6 +290,12 @@ var tests = { result = db.query(map, reduce, {startkey: 4, endkey: 6}); T(result.rows[0].value == 15); + result = db.query(map, reduce, {group:true, count:3}); + T(result.rows.length == 3); + T(result.rows[0].value == 1); + T(result.rows[1].value == 2); + T(result.rows[2].value == 3); + for(var i=1; i<numDocs/2; i+=30) { result = db.query(map, reduce, {startkey: i, endkey: numDocs - i}); T(result.rows[0].value == summate(numDocs-i) - summate(i-1)); |