Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 5854 invoked from network); 24 Mar 2009 12:41:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2009 12:41:57 -0000 Received: (qmail 16861 invoked by uid 500); 24 Mar 2009 12:41:57 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 16774 invoked by uid 500); 24 Mar 2009 12:41:57 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 16764 invoked by uid 99); 24 Mar 2009 12:41:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2009 12:41:56 +0000 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2009 12:41:46 +0000 Received: from [192.168.1.100] (dhcp-077-249-044-252.chello.nl [::ffff:77.249.44.252]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Tue, 24 Mar 2009 12:41:24 +0000 Message-Id: From: Jan Lehnardt To: dev@couchdb.apache.org In-Reply-To: <56a83cd00903231225k7ed80fa0g66d596d9274bb167@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Where to add documentation for bulk updates Date: Tue, 24 Mar 2009 13:40:53 +0100 References: <56a83cd00903220737j16081b66nee344fcfad9f6123@mail.gmail.com> <20090322220237.GC5800@uk.tiscali.com> <56a83cd00903230648n19169a3egf4601c716b9d87ae@mail.gmail.com> <20090323142311.GA11694@uk.tiscali.com> <56a83cd00903230959k7271080el2d4f6af9b2b25053@mail.gmail.com> <20090323174055.GA15016@uk.tiscali.com> <56a83cd00903231225k7ed80fa0g66d596d9274bb167@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org Great work there David ( & Brian ) , thanks a lot! Cheers Jan -- On 23 Mar 2009, at 20:25, David Van Couvering wrote: > Fixed. Thanks for catching this. Obviously I should have tested > this, but > I am very busy right now, and I wanted to get this doc out in time > for the > release. > > David > > On Mon, Mar 23, 2009 at 10:40 AM, Brian Candler > wrote: > >> On Mon, Mar 23, 2009 at 09:59:56AM -0700, David Van Couvering wrote: >>> OK, thanks, I didn't read down far enough. I fixed the conflict >>> and >>> made some more updates to make the overall section more clean and >>> consistent, and added some more meat to the examples. >> >> Cheers. Could you also fix the all-or-nothing documentation while >> you're at >> it. Experimentation suggests it doesn't work if you add >> ?all_or_nothing=true >> or ?all-or-nothing=true to the URL; rather you need to put >> {"all_or_nothing":true} as part of the POSTed JSON. >> >> Demo: >> >> $ curl http://localhost:5984/ >> {"couchdb":"Welcome","version":"0.9.0a757393"} >> $ DB="http://127.0.0.1:5984/tstconf" >> $ curl -X PUT "$DB" >> {"ok":true} >> $ curl -X PUT -d '{"name":"fred"}' "$DB/person" >> {"ok":true,"id":"person","rev":"1-877727288"} >> $ curl -X POST -d >> '{"docs":[{"_id":"person","_rev":"1-877727288","name":"jim"}]}' >> "$DB/_bulk_docs?all_or_nothing=true" >> [{"id":"person","rev":"2-3595405"}] >> $ curl -X POST -d >> '{"docs":[{"_id":"person","_rev":"1-877727288","name":"trunky"}]}' >> "$DB/_bulk_docs?all_or_nothing=true" >> [{"id":"person","error":"conflict","reason":"Document update >> conflict."}] >> $ curl -X POST -d >> '{"docs":[{"_id":"person","_rev":"1-877727288","name":"trunky"}]}' >> "$DB/_bulk_docs?all-or-nothing=true" >> [{"id":"person","error":"conflict","reason":"Document update >> conflict."}] >> >> But: >> >> $ curl -X POST -d >> '{"all_or_nothing":true,"docs": >> [{"_id":"person","_rev":"1-877727288","name":"trunky"}]}' >> "$DB/_bulk_docs" >> [{"id":"person","rev":"2-2835283254"}] >> $ curl "$DB/person?conflicts=true" >> >> {"_id":"person","_rev":"2-3595405","name":"jim","_conflicts": >> ["2-2835283254"]} >> >> Regards, >> >> Brian. >> > > > > -- > David W. Van Couvering > > I am looking for a senior position working on server-side Java > systems. > Feel free to contact me if you know of any opportunities. > > http://www.linkedin.com/in/davidvc > http://davidvancouvering.blogspot.com > http://twitter.com/dcouvering