summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/files/designs/users/User.json
blob: 4089ad97d0a6ac0a316f608f45e3dceb1558c9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "_id": "_design/User",
  "language": "javascript",
  "views": {
    "by_login": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'User') && (doc['login'] != null)) {\n                    emit(doc['login'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "all": {
      "map": "                function(doc) {\n                  if (doc['type'] == 'User') {\n                    emit(doc._id, null);\n                  }\n                }\n"
    },
    "by_created_at_and_one_month_warning_not_sent": {
      "map": "function (doc) {\n  if ((doc['type'] == 'User') && (doc['created_at'] != null) && (doc['one_month_warning_sent'] == null)) {\n    emit(doc['created_at'], 1);\n  }    \n}\n",
      "reduce": "function(key, values, rereduce) { return sum(values); }"
    },
    "by_created_at": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'User') && (doc['created_at'] != null)) {\n                    emit(doc['created_at'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    }
  },
  "couchrest-hash": "61840ab3ec0f94ef8bbd6dd208db3b70"
}