From user-return-14792-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Feb 07 23:25:55 2011 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 88789 invoked from network); 7 Feb 2011 23:25:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2011 23:25:55 -0000 Received: (qmail 83951 invoked by uid 500); 7 Feb 2011 23:25:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 83839 invoked by uid 500); 7 Feb 2011 23:25:53 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 83831 invoked by uid 99); 7 Feb 2011 23:25:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 23:25:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wayne@databill.com designates 69.16.152.116 as permitted sender) Received: from [69.16.152.116] (HELO mail1.databill.com) (69.16.152.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 23:25:47 +0000 Received: from [10.0.0.15] ([::ffff:10.0.0.15]) (AUTH: LOGIN wayne@databill.com) by mail1.databill.com with esmtp; Mon, 07 Feb 2011 16:25:26 -0700 id 01604020.4D507F66.00001C5A Message-ID: <4D507F64.7030405@databill.com> Date: Mon, 07 Feb 2011 16:25:24 -0700 From: Wayne Conrad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Atomic update of multiple attachments? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Is there anything I can do to achieve the illusion of atomic update of a set of attachments? Here's the effect I'd like: For create: 1. Create a document. 2. Add attachments to it. 3. Only now does the document and all of its attachments become visible. For update: 1. Delete all of the document's attachments. 2. Add a new set of attachments to the document. 3. Only now does the new set of attachments appear to replace the old. I'm using Couchdb 1.0.2 and CouchRest 1.0.1. I'm not opposed to cheating to achieve my goal. Suggestions of "Did you think of doing this-other-thing instead?" are also welcome.