You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Alexander Shorin (JIRA)" <ji...@apache.org> on 2016/08/05 10:15:20 UTC
[jira] [Commented] (COUCHDB-3094) Get doc updated on put
[ https://issues.apache.org/jira/browse/COUCHDB-3094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409284#comment-15409284 ]
Alexander Shorin commented on COUCHDB-3094:
-------------------------------------------
Technically, you should already know the previous document state to update it since you need specify the _rev field to PUT the data. And there you can do diff locally. How it could be otherwise?
> Get doc updated on put
> ----------------------
>
> Key: COUCHDB-3094
> URL: https://issues.apache.org/jira/browse/COUCHDB-3094
> Project: CouchDB
> Issue Type: Improvement
> Components: Database Core
> Reporter: Thaina Yu
>
> When we PUT to update document. I think it should have an option to get return as a difference between version of document, or older version (or has an option for both)
> suppose we have doc { "test0" : 0,"test1":"TT","test2":false }
> then we PUT /docID?return=diff { "test0" : "test" : "test1" : "TT" }
> we get {
> old: { _rev:oldID, "test0" : 0,"test2":false } // no test1 because no change
> new: { _rev:newID, "test0" : "test" }
> }
> something like this would be useful
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)