Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification. The "Formatting_with_Show_and_List" page has been changed by JanLehnardt. The comment on this change is: clarifications. http://wiki.apache.org/couchdb/Formatting_with_Show_and_List?action=diff&rev1=21&rev2=22 -------------------------------------------------- = Formatting with Show and List = <> - Note that this is only available in CouchDB 0.9 or newer — The API might still change. + Note that this is only available in CouchDB 0.9 or newer The basics of formatting documents using `show` and `list` functions. These functions convert documents and views, respectively, into non-JSON formats. The rows of each view are processed individually, which keeps long lists from becoming memory hogs. @@ -62, +62 @@ }}} The request and response objects are of the same format used by `_external` functions, as documented in ExternalProcesses. + Since CouchDB 0.11.0 you can use the `send()` function as explained below in show functions. + - == Listing Views with couchdb 0.9 == + == Listing Views with CouchDB 0.9 == List functions are stored under the `lists` key of a design document. Here's an example design doc with list functions, in addition to views: {{{#!highlight javascript @@ -128, +130 @@ } }}} - == Listing Views with couchdb 0.10 == + == Listing Views with CouchDB 0.10 and later == - The list API has changed significantly from 0.9 to 0.10. + The list API simplified from 0.9 to 0.10 Example `list` function {{{#!highlight javascript function(head, req) { var row; + start({ + "headers": { + "Content-Type": "text/html" + } + }); while(row = getRow()) { send(row.value); }