incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: Using JavaScript libs in a view's map function
Date Mon, 30 Jan 2012 16:07:03 GMT
On Mon, Jan 30, 2012 at 8:17 AM, Luscus Readbeard
<> wrote:
> Hello everybody,
> I am new to CouchDB and I would like to ask some question regarding
> the building of complex map functions.
> I looked at following documentation in the wiki:
> CommomJS Modules (
> JavascriptPatternViewCommonJs
> (
> But I found this possibility of using some js libs very unsatisfying
> since you have to be in some CouchApp context.

There's no CouchApp dependency here. In views you can load commonjs
modules to use in your map function.

> What I would like to do is to be able to load some other docs or view
> results in the map function in order to make some complex processing.

This isn't possible and won't ever be. If we allowed injection of
random data into a view computation we'd never know when we needed to
invalidate the results and rebuild.

> I found the jquery.couch.js very convenient for example, I am
> wondering is something comparable is accessible on the server side...
> Thanks for any hint.
> Luscus

View raw message