我有一个现有的设计文档。我想使用 curl POST 命令导入这个设计视图。这样我就可以在 fauxton 中查看它。
{
"total_rows": 1,
"offset": 1,
"rows": [
{
"id": "_design/editor",
"key": "_design/editor",
"value": {
"rev": "1-c74604129e122055f0b58760a7e08ed8"
},
"doc": {
"_id": "_design/editor",
"_rev": "1-c74604129e122055f0b58760a7e08ed8",
"language": "javascript",
"views": {
"all_vendors": {
"map": "function(doc) {\n if (doc.type==\"vendor\"){\n emit(doc.name, doc.name);\n }\n}"
}
}
}
}
]
}
我正在尝试使用以下命令将此文档添加到现有数据库中
curl -X POST http://127.0.0.1:5984/${db_name}/_design/${design_name}/_view/${view_name}