tastydb
tastydb

Reputation: 542

Is it there a way to get a specific revision?

I'm learning CouchDB and I just read that when it comes to confict resolution, CouchDB keeps two revisions of the document, the winning one and the conflicted one. Does CouchDB keep several revisions of the same document? How can I get a specific revision?

Upvotes: 1

Views: 1620

Answers (1)

amedina
amedina

Reputation: 3426

Yes, CouchDB keeps several revisions of a document, but not forever. In fact, you can query them using something like this (accordly to the documentation):

GET /recipes/{docid}?revs_info=true

And, if you want to retrieve an especific revision, you can do something like this:

GET /recipes/{docid}?rev={revid}

Here you have the link to the documentation.

Upvotes: 3

Related Questions