apache / nano

Nano is now part of Apache CouchDB. Repo moved to https://GitHub.com/apache/couchdb-nano

Home Page:https://github.com/apache/couchdb-nano

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get only return latest revision of document

majidgolshadi opened this issue · comments

Based on couchdb doc I try this code but it's only return last data version

db.get('rabbit', {open_revs: ["7-6b29424ebe73f22bbef54611c302b849"]}, function(err, body) {
      console.log(body); // return 10th rev 
});

How can I fetch the older version of a doc?

Finally I found the solution

db.get('rabbit', {rev: "7-6b29424ebe73f22bbef54611c302b849"}, function(err, body) {
    console.log(body);
});