Description
Requirement
A number of components - UI (see MB-24833), N1QL, etc.. want to be able to introspect the set of XATTRs which exist on a document. This then allows them to fetch the particular XATTRs they are interested in.
Solution
Proposal is to add a new Virtual XATTR on each document, which returns a "Table of Contents" for that XATTR.
- Add a $XTOC virtual XATTR which would return a list of the XATTRs which a Document has:
"$XTOC" : [ “_sync", “user_foo" ]
|
- This would obey the RBAC properties the user had - so if they didn’t have SystemXattrRead then only user XATTR names (user_foo) would be returned.
The client could then choose to perform a SubDoc Lookup on the XATTR(s) they want the values for.