向 couchdb 设计文档添加注释
adding comments to a couchdb design doc
有没有办法在 couchdb 设计文档中输入评论?
查询可能会变得非常神秘,如果能够对他们所做的事情进行简短的人工描述,那就太好了。
如果你想在你的 JS 代码中添加注释,那很好。
function (doc) {
// comments are ok here
if (doc.type === 'user') emit(doc.username);
}
但是,您不能向外部 JSON 添加评论,因为 JSON 不支持评论。
{
"views": {
"by-name": {
// you can't put comments here
"map": "function (doc) { ..."
}
}
}
有没有办法在 couchdb 设计文档中输入评论?
查询可能会变得非常神秘,如果能够对他们所做的事情进行简短的人工描述,那就太好了。
如果你想在你的 JS 代码中添加注释,那很好。
function (doc) {
// comments are ok here
if (doc.type === 'user') emit(doc.username);
}
但是,您不能向外部 JSON 添加评论,因为 JSON 不支持评论。
{
"views": {
"by-name": {
// you can't put comments here
"map": "function (doc) { ..."
}
}
}