Created
March 15, 2019 08:36
-
-
Save mohammed-ali-1/e390d3f9725cf0001f19f432e9332fa4 to your computer and use it in GitHub Desktop.
views.json file for CouchDB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_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