Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1436

Provide raw mutateIn API

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • 2.7.9
    • subdoc
    • None
    • 1

    Description

      We allow users to use custom serialized objects and store them in Couchbase using RawJsonDocument, rather than having to converting to a JsonObject to then have to de-serialize it again to do the write.

      Similarly, we allow users to access these raw bytes (for custom serialization) using the subdocument API using IncludeRaw() - https://docs.couchbase.com/sdk-api/couchbase-java-client/com/couchbase/client/java/subdoc/LookupInBuilder.html#includeRaw-boolean-.

      It would be good to have some kind of equivalent raw-byte API for the mutation side of the subdocument API, so that users do not have to serialize then deserialize their objects again like so:

      newsBucket.mutateIn("exampleDoc")
          .arrayAppend(
              "exampleField",
              JsonObject.fromJson(
                  objectMapper.writeValueAsString(exampleObject)))
      

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            matt.carabine Matt Carabine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty