我正在学习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=trueAnd, 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.
更多推荐
有没有办法得到特定的修订?
发布评论