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] Trivial Update of "HTTP_view_API" by Julian Vassev
Date Tue, 10 Aug 2010 20:11:37 GMT
Dear Wiki user,

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

The "HTTP_view_API" page has been changed by Julian Vassev.
http://wiki.apache.org/couchdb/HTTP_view_API?action=diff&rev1=44&rev2=45

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

  
  If a view contains both a map and reduce function, querying that view will by default return
the result of the reduce function. The result of the map function only may be retrieved by
passing ''reduce=false'' as a query parameter.
  
- The ''include_docs'' option will include the associated document. Although, the user should
keep in mind that there is a race condition when using this option. It is possible that between
reading the view data and fetching the corresponding document that the document has changed.
If you want to alleviate such concerns you should emit an object with a _rev attribute as
in ''emit(key, {"_rev": doc._rev})''. This alleviates the race condition but leaves the possiblity
that the returned document has been deleted (in which case, it includes the ''"_deleted":
true'' attribute).
+ The ''include_docs'' option will include the associated document. Although, the user should
keep in mind that there is a race condition when using this option. It is possible that between
reading the view data and fetching the corresponding document that the document has changed.
If you want to alleviate such concerns you should emit an object with a _rev attribute as
in ''emit(key, {"_rev": doc._rev})''. This alleviates the race condition but leaves the possibility
that the returned document has been deleted (in which case, it includes the ''"_deleted":
true'' attribute).
  
  The ''inclusive_end'' option controls whether the ''endkey'' is included in the result.
It defaults to true.
  

Mime
View raw message