couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r690349 - in /incubator/couchdb/branches/json_term_changes: share/www/script/couch_tests.js src/couchdb/couch_httpd.erl
Date Fri, 29 Aug 2008 17:54:43 GMT
Author: damien
Date: Fri Aug 29 10:54:43 2008
New Revision: 690349

URL: http://svn.apache.org/viewvc?rev=690349&view=rev
Log:
Fix for problem with startkey and _all_docs.

Modified:
    incubator/couchdb/branches/json_term_changes/share/www/script/couch_tests.js
    incubator/couchdb/branches/json_term_changes/src/couchdb/couch_httpd.erl

Modified: incubator/couchdb/branches/json_term_changes/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/json_term_changes/share/www/script/couch_tests.js?rev=690349&r1=690348&r2=690349&view=diff
==============================================================================
--- incubator/couchdb/branches/json_term_changes/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/branches/json_term_changes/share/www/script/couch_tests.js [utf-8] Fri
Aug 29 10:54:43 2008
@@ -827,6 +827,10 @@
 
     T(db.bulkSave(makeDocs(1, numDocs + 1)).ok);
 
+    // test that the _all_docs view returns correctly with keys
+    var results = db.allDocs({startkey:"_design%2F", endkey:"_design%2FZZZ"});
+    T(results.rows.length == 1);
+
     for (var loop = 0; loop < 2; loop++) {
       var rows = db.view("test/all_docs").rows;
       for (var i = 0; i < numDocs; i++) {

Modified: incubator/couchdb/branches/json_term_changes/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/json_term_changes/src/couchdb/couch_httpd.erl?rev=690349&r1=690348&r2=690349&view=diff
==============================================================================
--- incubator/couchdb/branches/json_term_changes/src/couchdb/couch_httpd.erl (original)
+++ incubator/couchdb/branches/json_term_changes/src/couchdb/couch_httpd.erl Fri Aug 29 10:54:43
2008
@@ -322,7 +322,7 @@
     {ok, Info} = couch_db:get_db_info(Db),
     TotalRowCount = proplists:get_value(doc_count, Info),
 
-    StartId = if is_list(StartKey) -> StartKey;
+    StartId = if is_binary(StartKey) -> StartKey;
     true -> StartDocId
     end,
 



Mime
View raw message