couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Norwich <rimaha2000-co...@yahoo.co.uk>
Subject Re: How to 'force write' in v2.0 ?
Date Thu, 14 May 2015 14:40:55 GMT
>> all_or_nothing doesn't introduces conflicts.

You mean it's the new behavior in 2.0 ? in 1.6 all_or_nothing will happily write and introduce
conflicts
as long as it pass validation.


>>  For introducing conflicts, use new_edits: false

I tried, but then the client has to generate rev manually and keep track all parents' revisions
all the
way until revpos 1. Is there simpler solution ?
Does the request needs to list all parents rev or only the latest one ? I tried both and its
successful.
e.g.:
 _revisions":{"start":4,"ids":["3595405","877727288","376647","28839289"]}
 _revisions":{"start":4,"ids":["3595405","877727288"]}

what is the implication of supplying only the latest rev ?


--------------------------------------------
On Thu, 14/5/15, Alexander Shorin <kxepal@gmail.com> wrote:

 Subject: Re: How to 'force write' in v2.0 ?
 To: "user@couchdb.apache.org" <user@couchdb.apache.org>, rimaha2000-couch@yahoo.co.uk
 Date: Thursday, 14 May, 2015, 20:44
 
 all_or_nothing
 doesn't introduces conflicts. It allows CouchDB to
 return an error response if any write fail.
 For introducing conflicts, use new_edits:
 false. But this is not a
 force write as
 validate_doc_update still may block your writes.
 --
 ,,,^..^,,,
 
 

Mime
View raw message