incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: JSON-Patch
Date Wed, 20 Apr 2011 21:47:45 GMT
Skimming RFC3284 it appears to be byte based which seems quite
incompatible with couchdb internals.

On Wed, Apr 20, 2011 at 5:37 PM, Robert Newson <robert.newson@gmail.com> wrote:
> 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