[英]adding comments to a couchdb design doc
Is there a way to enter comments into a couchdb design doc? 有没有办法在couchdb设计文档中输入注释?
The queries can get pretty cryptic, and it would be really nice to be able to write a brief human description of what they do. 查询可以变得非常神秘,能够写出他们所做的简短的人类描述真的很棒。
If you want to add comments to your JS code, that's fine. 如果你想为你的JS代码添加注释,那很好。
function (doc) {
// comments are ok here
if (doc.type === 'user') emit(doc.username);
}
However, you can't add comments to the outer JSON, since JSON doesn't support comments. 但是,您无法向外部JSON添加注释,因为JSON不支持注释。
{
"views": {
"by-name": {
// you can't put comments here
"map": "function (doc) { ..."
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.