summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/files/designs/invite_codes/InviteCode.json
blob: d6e1e9d5d622ac017aad02c449bf3a509c734448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
  "_id": "_design/InviteCode",
  "language": "javascript",
  "views": {
    "by_invite_code": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'InviteCode') && (doc['invite_code'] != null)) {\n                    emit(doc['invite_code'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "by_invite_count": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'InviteCode') && (doc['invite_count'] != null)) {\n                    emit(doc['invite_count'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "by_created_at": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'InviteCode') && (doc['created_at'] != null)) {\n                    emit(doc['created_at'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "by_updated_at": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'InviteCode') && (doc['updated_at'] != null)) {\n                    emit(doc['updated_at'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "all": {
      "map": "                function(doc) {\n                  if (doc['type'] == 'InviteCode') {\n                    emit(doc._id, null);\n                  }\n                }\n"
    }
  },
  "couchrest-hash": "2d1883c83164a0be127c3a569d9c1902"
}