incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <>
Subject Re: The sum function (used in reduce)
Date Thu, 23 Apr 2009 15:06:49 GMT
Nils Breunese wrote:

> Adam Wolff wrote:
>> It'd be great to make it so that _design docs can define helper
>> functions too, so that two views can share a helper.
> You can already define functions in a separate file and use macros to  
> 'import' them when defining view functions.

For clarity: macros are a couchapp feature. Examples of the use of !json 
and !code macros can be found in Sofa [0], for instance in 
lists/index.js. They look like comments (starting with '//' and all), 
but those lines are processed by couchapp when pushing an app to CouchDB.

Nils Breunese.


View raw message