Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
views.json file for CouchDB
{
"_id": "_design/subscriptions",
"views": {
"host_topic_counts": {
"reduce": "_sum",
"map": "function (doc) {\n emit(doc.url + '#' + doc.topic, 1);\n}"
},
"host_topic_triggers": {
"map": "function (doc) {\n emit(doc.url + '#' + doc.topic, {trigger: doc._id, username: doc.username, password: doc.password});\n}"
},
"all": {
"map": "function (doc) {\n emit(doc._id, doc.url + '#' + doc.topic);\n}"
},
"host_triggers": {
"map": "function (doc) {\n emit(doc.url, {trigger: doc._id, username: doc.username, password: doc.password});\n}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.