CouchDB를 사용하여 메시지 응용 프로그램을 구현하고 있습니다. 각 메시지에 타임 스탬프를 적용하고 싶습니다. 나는 이것을 위해 document update handlers을 사용해야한다는 것을 나타내는 몇 가지 참조를 발견했습니다. 장소 업데이트가 옳은 것처럼 보입니다. 하지만 타임 스탬프는 어디에서 얻을 수 있습니까? 그것은 어딘가 req 개체에 있습니까?CouchDb 자동 타임 스탬프
{
updates: {
"in-place" : function(doc, req) {
doc.timestamp = "???";
var message = "set timestamp to "+doc.timestamp;
return [doc, message];
}
}
}
http://stackoverflow.com/questions/4812235/whats-the-best-way-to-store-datetimes-timestamps-in-couchdb – abernier