How to do partial update of a document

后端 未结 2 1449
借酒劲吻你
借酒劲吻你 2020-12-02 01:40

I need a guidance on how can I update a field in CouchDB. I tried curl via console it works fine but programatically. I don\'t understand how to update a particular field sa

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 02:13

    Partial updates are not supported by CouchDB. In other words, to update a field in the document, you must update the field in your local JSON document and push that document to CouchDB as a whole.

    You can accomplish this by still issuing an HTTP PUT, ensuring the appropriate _rev is included in your document.

    More details are available in the wiki.

提交回复
热议问题