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

后端 未结 2 1331
無奈伤痛
無奈伤痛 2021-01-16 06:50

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 reve

2条回答
  •  清酒与你
    2021-01-16 07:10

    Try one of the options - this it's from pouchdb docs:

    db.get(docId, [options], [callback])

    Retrieves a document, specified by docId.

    Options All options default to false unless otherwise specified.

    options.rev: Fetch specific revision of a document. Defaults to winning revision (see the CouchDB guide).

    options.revs: Include revision history of the document.

    options.revs_info: Include a list of revisions of the document, and their availability.

    options.open_revs: Fetch all leaf revisions if open_revs="all" or fetch all leaf revisions specified in open_revs array. Leaves will be returned in the same order as specified in input array.

提交回复
热议问题