有没有办法得到特定的修订?

编程入门 行业动态 更新时间:2024-10-15 18:27:13
本文介绍了有没有办法得到特定的修订?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在学习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.

更多推荐

有没有办法得到特定的修订?

本文发布于:2023-07-09 01:21:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1082538.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:没有办法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!