incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From N/A N/A <pressley...@yahoo.com>
Subject couchdb: function eval on insert, update...
Date Thu, 03 Nov 2011 13:14:29 GMT
Hi,

Any plans to implement doc features, like expression evaluation on insert or update in CouchDB?
For example:
POST:
{
"test1": "1",
"test2": "2",
"test3": function(doc) { 
var res = doc.test1 + doc.test2 
return res;
/* or maybe even                if (doc["test2"]) { 
doc["test4"]();
} else {
... more stuff...
}
*/
    }
"test4": function(doc_or_maybe_something_else) { ... }
}

result in couchdb:
{
"test1": "1",
"test2": "2",
"test3": "3"
// ..etc.
}


Regards
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message