incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: JSON-Patch
Date Wed, 20 Apr 2011 21:37:57 GMT
supporting RFC 3284 format for PUT has been proposed before, and it's generic.

B.

On 20 April 2011 21:55, sleepnova <wanpeebaw@gmail.com> wrote:
> A sudo patch for demonstration.
>
> if(doc._rev=="07769cff70767095e4fb525dc9000b6e"){
>   //Put your patch here
> }
>
> I think above patch would be idempotent even when add or remove an array
> element based on an index.
>
> 2011/4/21 sleepnova <wanpeebaw@gmail.com>
>
>> A patch which checks document version number might solve this problem.
>> similar to a git commit log
>>
>>
>> 2011/4/21 Aurélien Bénel <aurelien.benel@utt.fr>
>>
>>> Dear Paul,
>>>
>>> > On the other hand, there's nothing inherently wrong with the PATCH verb
>>>
>>> True, PATCH could be idempotent... It just depends on your patch format.
>>>
>>> I just had a look at your patch operations specification:
>>> - When you add or remove a key/value, this is idempotent.
>>> - However, when you add or remove an array element based on an index, this
>>> is not.
>>>
>>>
>>> Regards,
>>>
>>> Aurélien
>>
>>
>> --
>> - sleepnova
>>
>
> --
> - sleepnova
>

Mime
View raw message