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 06:12:20 UTC

[jira] [Commented] (COUCHDB-3093) Please support PATCH on document

    [ https://issues.apache.org/jira/browse/COUCHDB-3093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408942#comment-15408942 ] 

Alexander Shorin commented on COUCHDB-3093:
-------------------------------------------

Ideally, PATCH method should work with [JSON Patch|https://tools.ietf.org/html/rfc6902] specification. There is no reason to invent something else for this.

> Please support PATCH on document
> --------------------------------
>
>                 Key: COUCHDB-3093
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3093
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>            Reporter: Thaina Yu
>
> I know I could do update handler (and I have create my own like this https://gist.github.com/Thaina/9e4d8d6643b3dee06903350ffc5d9714)
> but it would be more efficient to just support natively. It would make all of us write PATCH in standard
> And I would like to suggest that you should natively support special string as function. something like 2 underscores for activate special function
> suppose current doc is { "number" : 1 }
> then patch with { "number" : "_-2_","text": "text","_usText_":"_=\"_usText_\"_" }
> result into { "number" : -1,"text": "text","_usText_":"_usText_" }
> So it could support append,prepend,insert,replace and delete
> Also I wish PATCH would return the updated diff



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)