couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r1064945 - /couchdb/trunk/src/couchdb/couch_httpd_db.erl
Date Sat, 29 Jan 2011 02:36:12 GMT
Author: kocolosk
Date: Sat Jan 29 02:36:11 2011
New Revision: 1064945

URL: http://svn.apache.org/viewvc?rev=1064945&view=rev
Log:
Respect latest=true option in open_revs calls

Patch by Randall Leeds, closes COUCHDB-853

Modified:
    couchdb/trunk/src/couchdb/couch_httpd_db.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=1064945&r1=1064944&r2=1064945&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_db.erl Sat Jan 29 02:36:11 2011
@@ -1157,6 +1157,9 @@ parse_doc_query(Req) ->
         {"open_revs", RevsJsonStr} ->
             JsonArray = ?JSON_DECODE(RevsJsonStr),
             Args#doc_query_args{open_revs=couch_doc:parse_revs(JsonArray)};
+        {"latest", "true"} ->
+            Options = [latest | Args#doc_query_args.options],
+            Args#doc_query_args{options=Options};
         {"atts_since", RevsJsonStr} ->
             JsonArray = ?JSON_DECODE(RevsJsonStr),
             Args#doc_query_args{atts_since = couch_doc:parse_revs(JsonArray)};



Mime
View raw message