[
https://issues.apache.org/jira/browse/COUCHDB-1584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488616#comment-13488616
]
Jan Lehnardt commented on COUCHDB-1584:
---------------------------------------
>From the mail, for reference:
diff --git a/share/www/script/test/all_docs.js
b/share/www/script/test/all_docs.js
index 66ad880..ff07b43 100644
--- a/share/www/script/test/all_docs.js
+++ b/share/www/script/test/all_docs.js
@@ -99,6 +99,21 @@ couchTests.all_docs = function(debug) {
TEquals(true, rows[0].value.deleted);
TEquals(null, rows[0].doc);
+ // try include_docs plus revision history
+ rows = db.allDocs({include_docs: true, revs: true}, ["2"]).rows;
+ TEquals(1, rows.length);
+ doc = rows[0].doc
+ TEquals("2", doc._id);
+ TEquals(3, doc.a);
+ TEquals({start: 1, ids: [doc._rev.slice(2)]}, doc._revisions);
+
+ rows = db.allDocs({include_docs: true, revs_info: true}, ["2"]).rows;
+ TEquals(1, rows.length);
+ doc = rows[0].doc
+ TEquals("2", doc._id);
+ TEquals(3, doc.a);
+ TEquals([{rev: doc._rev, status: "available"}], doc._revs_info);
+
// add conflicts
var conflictDoc1 = {
_id: "3", _rev: "2-aa01552213fafa022e6167113ed01087", value: "X"
> Allow passing of open_doc parameters to _all_docs
> -------------------------------------------------
>
> Key: COUCHDB-1584
> URL: https://issues.apache.org/jira/browse/COUCHDB-1584
> Project: CouchDB
> Issue Type: New Feature
> Affects Versions: 1.2
> Reporter: Jan Lehnardt
> Priority: Minor
>
> GET /_all_docs should take the same arguments as GET /db/doc
> /_all_docs?revisions=true
> /_all_docs?revs_info=true
> See http://wiki.apache.org/couchdb/HTTP_Document_API#GET for details
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira