title: How do we use CouchDB's _bulk_docs with all_or_nothing option?
body: <p>In the <a href="http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API" rel="nofollow">CouchDB documentation</a> they say we can insert documents in bulk, with <code>all_or_nothing</code> or <code>new_edits</code> option if we want to. But it seems, <code>all_or_nothing</code> key does not have any effects when we use like so: </p>
  
  <pre><code>HOST="http://test:test@localhost:5984/mydb"
  
  curl -vX POST "$HOST/_bulk_docs" \
      -H "Content-type: application/json" \
      -d @test.json
  </code></pre>
  
  <p>with a test.json: </p>
  
  <pre><code>{
      "all_or_nothing":true,
      "docs":[
          {"_id":"hello"},
          {"_id":"world"}
      ]
  }
  </code></pre>
  
  <p>This inserts documents which have <code>hello</code> and <code>world</code> ids. Re-running the script by replacing <code>hello</code> with <code>hello1</code> should cause <code>hello1</code> to be inserted in the database but fail the <code>world</code> document's recording (since it doesn't have correct <code>_rev</code>), thus they both SHOULD fail because we said <code>all_or_nothing</code>. But in the end, there are 3 documents in the database: <code>hello</code>, <code>hello1</code> and <code>world</code>. </p>
  
  <p>How do we use <code>all_or_nothing</code> with CouchDB?</p>