Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 17612 invoked from network); 23 Mar 2009 17:41:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Mar 2009 17:41:31 -0000 Received: (qmail 43490 invoked by uid 500); 23 Mar 2009 17:41:30 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 43412 invoked by uid 500); 23 Mar 2009 17:41:30 -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 43402 invoked by uid 99); 23 Mar 2009 17:41:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 17:41:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of b.candler@pobox.com designates 208.72.237.25 as permitted sender) Received: from [208.72.237.25] (HELO sasl.smtp.pobox.com) (208.72.237.25) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 17:41:21 +0000 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 9D110848D; Mon, 23 Mar 2009 13:40:58 -0400 (EDT) Received: from mappit (unknown [80.45.95.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 2EAA2848C; Mon, 23 Mar 2009 13:40:57 -0400 (EDT) Received: from brian by mappit with local (Exim 4.69) (envelope-from ) id 1Llo8t-0003wW-FF; Mon, 23 Mar 2009 17:40:55 +0000 Date: Mon, 23 Mar 2009 17:40:55 +0000 From: Brian Candler To: David Van Couvering Cc: dev@couchdb.apache.org Subject: Re: Where to add documentation for bulk updates Message-ID: <20090323174055.GA15016@uk.tiscali.com> References: <56a83cd00903220737j16081b66nee344fcfad9f6123@mail.gmail.com> <20090322220237.GC5800@uk.tiscali.com> <56a83cd00903230648n19169a3egf4601c716b9d87ae@mail.gmail.com> <20090323142311.GA11694@uk.tiscali.com> <56a83cd00903230959k7271080el2d4f6af9b2b25053@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56a83cd00903230959k7271080el2d4f6af9b2b25053@mail.gmail.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Pobox-Relay-ID: C4DC393E-17D1-11DE-8C65-C5D912508E2D-28021239!a-sasl-quonix.pobox.com X-Virus-Checked: Checked by ClamAV on apache.org 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.