incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: The sum function (used in reduce)
Date Thu, 23 Apr 2009 16:19:35 GMT
CouchApp == Not necessarily much help to the rest of us.

Seriously, though, I've heard this before and decided instead to
handle this in my application code...

On Thu, Apr 23, 2009 at 10:06 AM, Nils Breunese <n.breunese@vpro.nl> wrote:
> 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.
>
> [0] http://github.com/jchris/sofa/tree/master
>

Mime
View raw message