couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wayne Conrad <>
Subject Atomic update of multiple attachments?
Date Mon, 07 Feb 2011 23:25:24 GMT
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.

View raw message