Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-9990

Add note or example to meta function showing virtual XATTRs query

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • Morpheus
    • Morpheus
    • query
    • None
    • 1

    Description

      Add to https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/metafun.html#meta a NOTE or example showing how to retrieve document virtual XATTRs, likely with a cross-link to https://docs.couchbase.com/server/current/learn/data/extended-attributes-fundamentals.html#virtual-extended-attributes.

      It should note clearly that access to virtual xattrs is an expensive operation that will impact query latency.

      e.g.

      select meta().xattrs.`$document` from default use keys["key1"]
      ...
          "results": [
          {
              "$document": {
                  "CAS": "0x16e978130d8f0000",
                  "datatype": [
                      "json"
                  ],
                  "deleted": false,
                  "exptime": 0,
                  "flags": 0,
                  "last_modified": "1650982761",
                  "revid": "10",
                  "seqno": "0x000000000000000a",
                  "value_bytes": 3,
                  "value_crc32c": "0xf01f9d27",
                  "vbucket_uuid": "0x0000563f86001ada"
              }
          }
          ],

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            simon.dew Simon Dew
            Donald.haggart Donald Haggart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty