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 "HTTP_Bulk_Document_API" by MalteStretz
Date Wed, 12 Jan 2011 15:35:33 GMT
Dear Wiki user,

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

The "HTTP_Bulk_Document_API" page has been changed by MalteStretz.
The comment on this change is: Condense example for better readability.
http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API?action=diff&rev1=10&rev2=11

--------------------------------------------------

  {{{
  $ DB="http://127.0.0.1:5984/tstconf"
  $ curl -X PUT "$DB"
+ $ curl -X PUT -d '{"name":"fred"}' "$DB/person"
+ $ curl -X POST -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"jim"}]}'
"$DB/_bulk_docs"
+ $ curl -X POST -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"trunky"}]}'
"$DB/_bulk_docs"
+ $ curl "$DB/person?conflicts=true"
  }}}
  
  Result:
  {{{#!highlight javascript
  {"ok":true}
- }}}
- 
- {{{
- $ curl -X PUT -d '{"name":"fred"}' "$DB/person"
- }}}
- 
- {{{#!highlight javascript
  {"ok":true,"id":"person","rev":"1-877727288"}
- }}}
- {{{
- $ curl -X POST -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"jim"}]}'
"$DB/_bulk_docs"
- }}}
- 
- {{{#!highlight javascript
  [{"id":"person","rev":"2-3595405"}]
- }}}
- 
- {{{
- $ curl -X POST -d '{"all_or_nothing":true,"docs":[{"_id":"person","_rev":"1-877727288","name":"trunky"}]}'
"$DB/_bulk_docs"
- }}}
- 
- {{{#!highlight javascript
  [{"id":"person","rev":"2-2835283254"}]
- }}}
- {{{
- $ curl "$DB/person?conflicts=true"
- }}}
- 
- {{{#!highlight javascript
  {"_id":"person","_rev":"2-3595405","name":"jim","_conflicts":["2-2835283254"]}
  }}}
  

Mime
View raw message