summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/files/designs/customers/Customer.json
blob: 1b4bbddde3aa4fd7d2616541d491239e80016ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "_id": "_design/Customer",
  "language": "javascript",
  "views": {
    "by_user_id": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'Customer') && (doc['user_id'] != null)) {\n                    emit(doc['user_id'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "by_braintree_customer_id": {
      "map": "                function(doc) {\n                  if ((doc['type'] == 'Customer') && (doc['braintree_customer_id'] != null)) {\n                    emit(doc['braintree_customer_id'], 1);\n                  }\n                }\n",
      "reduce": "_sum"
    },
    "all": {
      "map": "                function(doc) {\n                  if (doc['type'] == 'Customer') {\n                    emit(doc._id, null);\n                  }\n                }\n"
    }
  },
  "couchrest-hash": "688c401ec0230b75625c176a88fc4a02"
}