CouchDB:master/detail\u视图或\u列表

CouchDB:master/detail\u视图或\u列表,couchdb,couchapp,Couchdb,Couchapp,在CouchDB中有没有一种方法可以创建主/详细视图或列表 从另一方面看,它看起来像_view只能呈现主视图,而_list只能呈现细节列表。因此,答案可以通过一个链接进行验证,确认这是不可能的。使用视图排序来收集详细信息: function(doc) { if (doc.type == "post") { emit([doc._id, 0], doc); } else if (doc.type == "comment") { emit([doc.post_id, 1],

在CouchDB中有没有一种方法可以创建主/详细视图或列表


从另一方面看,它看起来像_view只能呈现主视图,而_list只能呈现细节列表。因此,答案可以通过一个链接进行验证,确认这是不可能的。

使用视图排序来收集详细信息:

function(doc) {
  if (doc.type == "post") {
    emit([doc._id, 0], doc);
  } else if (doc.type == "comment") {
    emit([doc.post_id, 1], doc);
  }
}
并使用
?键=