有没有办法得到特定的修订? [英] Is it there a way to get a specific revision?

查看:86
本文介绍了有没有办法得到特定的修订?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习CouchDB,我刚刚读到,关于冲突解决,CouchDB保留了该文档的两个修订版本,一个是获胜版本,另一个是有冲突版本。 CouchDB是否保留同一文档的多个修订版?如何获得特定的修订版本?实际上,您可以使用类似这样的查询(根据文档):

  GET / recipes / {docid}?revs_info =真正的

而且,如果要检索特定版本,可以执行以下操作:

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

这里您有链接到文档。


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?

解决方案

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.

这篇关于有没有办法得到特定的修订?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆