Quantcast
Channel: Is there a way to get all revisions of a document in PouchDB when using the change feed? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Is there a way to get all revisions of a document in PouchDB when using the change feed?

$
0
0

I'm fiddling around with PouchDB at the moment. I use it as a way to store data locally without it being linked to CouchDB. What I've been trying to do is to create a revert/undo method for a single doc. For this I would like to use the previous revisions of the "doc". I came across the changes feed while reading the PouchDB documentation, which at first seems to be a way to get all the revisions of the all the "docs". However, after trying to get all the revisions of the "docs" I've only got the latest revision. I've tried the following to get the changes:

db.changes({    since: 0,    style: 'all_docs',    include_docs: true // eslint-disable-line camelcase  }).then(function(results) {    console.log(results);  }); 

TL;DR how can I get all the revisions of a (or all) document(s) in PouchDB?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images