I'm using Couchdb 1.6.1. I have a show inside test
design.
{
"select": {
"map": "function(a){emit(null,a._id)}"
}
}
i'm using Nano
Node modules to interact with the database. When i run js file below this { Error: Expression does not eval to a function. ([object Object])
error message is returned.
this.database.show('test', 'select', 35435156453, function (error, body) {
if(error) {
console.log(error);
}
else{
console.log(body);
}
});
I tried wrapping up the function with parentheses like below. That didn't work
{
"select": {
"map": "(function(a){emit(null,a._id)})"
}
}
Why I'm getting this error?