Return-Path: Delivered-To: apmail-incubator-couchdb-commits-archive@locus.apache.org Received: (qmail 2684 invoked from network); 15 May 2008 11:45:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 11:45:01 -0000 Received: (qmail 21579 invoked by uid 500); 15 May 2008 11:45:03 -0000 Delivered-To: apmail-incubator-couchdb-commits-archive@incubator.apache.org Received: (qmail 21551 invoked by uid 500); 15 May 2008 11:45:03 -0000 Mailing-List: contact couchdb-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-commits@incubator.apache.org Received: (qmail 21535 invoked by uid 99); 15 May 2008 11:45:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 04:45:02 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 11:44:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BAFAC2388A59; Thu, 15 May 2008 04:44:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r656589 - in /incubator/couchdb/trunk: share/www/script/couch_tests.js src/couchdb/couch_httpd.erl Date: Thu, 15 May 2008 11:44:38 -0000 To: couchdb-commits@incubator.apache.org From: jan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080515114438.BAFAC2388A59@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jan Date: Thu May 15 04:44:37 2008 New Revision: 656589 URL: http://svn.apache.org/viewvc?rev=656589&view=rev Log: ignore descending=false option instead of throwing an error. includes a test case Modified: incubator/couchdb/trunk/share/www/script/couch_tests.js incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Modified: incubator/couchdb/trunk/share/www/script/couch_tests.js URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/couch_tests.js?rev=656589&r1=656588&r2=656589&view=diff ============================================================================== --- incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] (original) +++ incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] Thu May 15 04:44:37 2008 @@ -423,6 +423,9 @@ restartServer(); T(db.open(designDoc._id) == null); T(db.view("test/no_docs") == null); + + + }, view_collation: function(debug) { @@ -602,6 +605,19 @@ T(queryResults.rows[j].key == i + 9 - j); } } + + // ignore decending=false. CouchDB should just ignore that. + for (i = 0; i < docs.length; i += 10) { + var queryResults = db.query(queryFun, {startkey:i, startkey_docid:i, + descending:false, count:10}); + T(queryResults.rows.length == 10) + T(queryResults.total_rows == docs.length) + T(queryResults.offset == i) + var j; + for (j = 0; j < 10;j++) { + T(queryResults.rows[j].key == i + j); + } + } }, view_sandboxing: function(debug) { Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=656589&r1=656588&r2=656589&view=diff ============================================================================== --- incubator/couchdb/trunk/src/couchdb/couch_httpd.erl (original) +++ incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Thu May 15 04:44:37 2008 @@ -599,6 +599,9 @@ _ -> Args %already reversed end; + {"descending", "false"} -> + % ignore + Args; {"skip", Value} -> case (catch list_to_integer(Value)) of Count when is_integer(Count) ->