我使用下面的代码来使用Kitura对CouchDB执行Swift代码。
database.queryByView("high-priority-tasks", ofDesign: "polls", usingParameters: [], callback: { (json: JSON?, error :NSError?) in
if error != nil {
try! response.status(.internalServerError).end()
}
response.send(json: json!)
})在我的CouchDB中,我创建了视图:

我得到以下错误:
po error?.localizedDescription!
▿ Optional<String>
- some : "Error: not_found, reason: missing"发布于 2017-03-21 20:11:47
我认为ofDesign参数在queryByView中应该是设计文档的名称(在您的情况下,它应该是“高优先级任务”(在字段设计文档中被截断)。
https://stackoverflow.com/questions/42936622
复制相似问题