From 45796298231349dadf650e9ddefd7a6ff32e1302 Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Fri, 11 Sep 2009 23:23:07 +0000 Subject: Refactoring of endkey code in views and btrees. End key functionaility is now handled inside the btree code, simplfying calling code and making it trivial to add new collation options git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814078 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/list_views.js | 4 ++-- share/www/script/test/view_collation.js | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'share') diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js index e297f0a3..d845f926 100644 --- a/share/www/script/test/list_views.js +++ b/share/www/script/test/list_views.js @@ -314,10 +314,10 @@ couchTests.list_views = function(debug) { }); T(xhr.status == 200, "multi key"); T(/Total Rows/.test(xhr.responseText)); - T(!(/Key: 1/.test(xhr.responseText))); + T(!(/Key: 1 /.test(xhr.responseText))); T(/Key: 2/.test(xhr.responseText)); T(/FirstKey: 2/.test(xhr.responseText)); - T(/LastKey: 7/.test(xhr.responseText)); + T(/LastKey: 11/.test(xhr.responseText)); // no multi-key fetch allowed when group=false xhr = CouchDB.request("POST", "/test_suite_db/_design/lists/_list/simpleForm/withReduce?group=false", { diff --git a/share/www/script/test/view_collation.js b/share/www/script/test/view_collation.js index 9bf06f9b..f4ae4a15 100644 --- a/share/www/script/test/view_collation.js +++ b/share/www/script/test/view_collation.js @@ -103,10 +103,14 @@ couchTests.view_collation = function(debug) { var rows = db.query(queryFun, null, {endkey : "b", descending:true, inclusive_end:false}).rows; T(rows[rows.length-1].key == "B") - - // inclusive_end=false overrides endkey_docid + var rows = db.query(queryFun, null, { - endkey : "b", endkey_docid: "b", + endkey : "b", endkey_docid: "10", inclusive_end:false}).rows; T(rows[rows.length-1].key == "aa") + + var rows = db.query(queryFun, null, { + endkey : "b", endkey_docid: "11", + inclusive_end:false}).rows; + T(rows[rows.length-1].key == "b") }; -- cgit v1.2.3