CouchDB
Erlang Python C JavaScript C++ Shell Other
Latest commit 3db6751 Feb 17, 2017 @hsharsha hsharsha committed with hsharsha MB-21350 Expose Extended attributes a.k.a XATTR to views
Extended Attributes that are streamed by KV are now included
in the metadata information of the document and are accessible
by views as `meta.xattrs` property

Sample metadata of document with xattrs now looks like
{
  "id": "xattr_demo_doc",
  "rev": "4-14a501b8539400000000000002000000",
  "seq": "4",
  "vb": "321",
  "expiration": 0,
  "flags": 33554432,
  "type": "json",
  "xattrs": {
    "doc": {
      "readcount": [
        10,
        11
      ],
      "author": "Jack"
    },
    "_sync": {
      "channels": [
        "UK",
        "USA",
        "EU"
      ]
    }
  }
}

whereas sample metadata of document not having xattrs looks like
{
  "id": "pymc0",
  "rev": "1-14a501f28e5b00000000000000000000",
  "seq": "1",
  "vb": "449",
  "expiration": 0,
  "flags": 0,
  "type": "json",
  "xattrs": {}
}

Change-Id: Iefb8d507a23737acdbe98ee632a0e7f09bdcde38
Reviewed-on: http://review.couchbase.org/73817
Tested-by: Harsha H S <hhs.couchbase@gmail.com>
Reviewed-by: Abhishek Singh <abhishek@couchbase.com>