couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "HttpDocumentApi" by damien
Date Fri, 09 May 2008 20:20:20 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by damien:
http://wiki.apache.org/couchdb/HttpDocumentApi

------------------------------------------------------------------------------
  
  === Modify Multiple Documents With a Single Request ===
  
- CouchDB provides a bulk insert/update feature. To use this, you make a ''POST'' request
to the URI ''/{dbname}/_bulk_docs'', with the request body being a JSON document containing
a list of new documents to be inserted.  The actual format of the request/result documents
differ between CouchDB 0.7.2 and 0.7.3(svn).
+ CouchDB provides a bulk insert/update feature. To use this, you make a ''POST'' request
to the URI ''/{dbname}/_bulk_docs'', with the request body being a JSON document containing
a list of new documents to be inserted or updated.  The actual format of the request/result
documents differ between CouchDB 0.7.2 and 0.7.3(svn).
  
  '''CouchDB 0.7.2''':
  
@@ -380, +380 @@

  }
  }}}
  
- ''There's currently no bulk deletion feature.''
+ Updating existing documents requires setting the ''_rev'' member to the revision being updated.
To delete a document set the ''_deleted'' member to true. '''CouchDB 0.7.3(svn)''':
+ 
+ {{{
+ {
+   "docs": [
+     {"_id": "0", "_rev": "3682408536", _deleted=true},
+     {"_id": "1", "_rev": "3206753266", "integer": 2, "string": "2"},
+     {"_id": "2", "_rev": "426742535", "integer": 3, "string": "3"}
+   ]
+ }
+ }}}
  
  === DELETE ===
  

Mime
View raw message