What Javascript Functions Are Available In The Couchdb Map And Reduce View Functions?
When writing map and reduce view functions for CouchDB in JavaScript, what are the build-in functions available? For example, various examples refer to the following 2 functions: e
Solution 1:
I don't know the CouchDB internals, however, from reading the sources, it looks like the map functions are evaluated in the sandbox created by init_sandbox()
. So the available "global" functions are the ones you see added to it. For example:
_sum
and _count
, instead, are built-in reduce functions written in Erlang, and you can only use them as-is.
Post a Comment for "What Javascript Functions Are Available In The Couchdb Map And Reduce View Functions?"