cloudant / swift-cloudant

A Swift Lang client for Cloudant and CouchDB
Apache License 2.0
42 stars 20 forks source link

Please Make it possible to Update a Document, the parameter is the key of the dictionary #163

Closed yinglidl closed 7 years ago

yinglidl commented 7 years ago

Please include the following information in your ticket.

We are using this resource to access Cloudant DB smoothly, I am very appreciate your contribution about this resource. But since there is such a method which can update a Doc by specify the KEY value. Is there any method I can use to UPDATE DOC, or would you please make it possible ?

Thanks very much !

ricellis commented 7 years ago

The PutDocumentOperation with a specified revision is used to update documents. Just set the revision to the revision that should be updated and the body to the new content.

ricellis commented 7 years ago

Currently Couch does not support, for example, the HTTP PATCH method so there is no way to update a single document key.

yinglidl commented 7 years ago

Thank you for your answer, I will try, and will feedback the result. Thanks again and have a nice day !