Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1051

Ability to create xattr and document in single operation

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Not a Bug
    • Blocker
    • None
    • None
    • library
    • None

    Description

      Sync Gateway needs the ability to create a document and system xattr in a single operation.  The subdoc API in V2 doesn't appear to support this.

      This was supported in V1, sample code from SG here:

       

      mutateInBuilder := bucket.MutateInEx(k, gocb.SubdocDocFlagMkDoc, gocb.Cas(cas), exp).
         UpsertEx(xattrKey, xv, gocb.SubdocFlagXattr).          
         UpsertEx(xattrCasProperty, "${Mutation.CAS}", gocb.SubdocFlagXattr|gocb.SubdocFlagUseMacros) 
         mutateInBuilder.UpsertEx(xattrBodyHashProperty, "${Mutation.value_crc32c}", gocb.SubdocFlagXattr|gocb.SubdocFlagUseMacros) 
         mutateInBuilder.UpsertEx("", v, gocb.SubdocFlagNone), 
      }
      

       

      Attachments

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

        Activity

          People

            charles.dixon Charles Dixon
            adamf Adam Fraser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty