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 "Formatting with Show and List" by RuneSkouLarsen
Date Wed, 22 Jul 2009 15:45:46 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 RuneSkouLarsen:
http://wiki.apache.org/couchdb/Formatting_with_Show_and_List

The comment on the change is:
Started show-api chapter for 0.10

------------------------------------------------------------------------------
  
  Show and list functions are side effect free and idempotent. They can not make additional
HTTP requests against CouchDB. Their purpose is to render JSON documents in other formats.
  
- == Showing Documents ==
+ == Showing Documents (in 0.9) ==
  
  Show functions are stored in your design document, under the `shows` key. Here's an example
set of show functions:
  
@@ -65, +65 @@

  
  
  The request and response objects are of the same format used by `_external` functions, as
documented in ExternalProcesses.
+ 
+ == Showing Documents (in 0.10) ==
+ The show API has changed significantly in 0.10.
+ 
+ Example `show` function
+ {{{
+ function(head, req){
+   var row;
+   while(row = getRow()) {
+     send(row.value);
+   }
+ }
+ }}}
  
  == Listing Views ==
  

Mime
View raw message