The answer is to use javascript's date functions.
{
updates: {
"in-place" : function(doc, req) {
doc.timestamp = new Date().getTime();
var message = "set timestamp to "+doc.timestamp;
return [doc, message];
}
}
}
Unfortunately, getting this update to trigger from jcouchdb is the next problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…