couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Rakotojaona <>
Subject Re: Data modelling
Date Thu, 12 Jul 2012 13:47:05 GMT
Just a precision :

On Thu, Jul 12, 2012 at 1:07 PM, Bernhard Gschwantner
<> wrote:
> With that construction, you can be sure that it will never happen that you
> deduct an amount from one account and never add it to the other. If you
> make this two transaction documents, It could be that you try to create
> both documents, but only one succeeds. Or if you replicate your database,
> the first one is replicated, and then the network connection goes down.

You can use the _bulk_docs endpoint with the all_or_nothing option, to
use some kind of transaction :

I know that replication uses the bulk API for putting the docs on the
target, but I don't know if it includes this option.


View raw message