Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1110

Fix subdocument array_insert() method definition

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.8, 3.0.9, 3.0.10
    • 3.2.0
    • None
    • None
    • 1

    Description

      couchbase/subdocument.py > array_insert() needs to have the xattr keyword argument moved after the *values argument:

      def array_insert(path, # type: str
          xattr=False, # type: bool
          *values # type: JSON
          ):
          # type: (...) -> Spec

       

      Currently, in order for this method to work the xattr keyword argument must be passed in before the values. 

       

      collection.upsert("array", [])
      collection.mutate_in("array", [SD.array_append("", "hello", "world")])
      collection.mutate_in("array", [SD.array_insert("[1]", False, "cruel")])

       

      Attachments

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

        Activity

          jared.casey Jared Casey created issue -
          jared.casey Jared Casey made changes -
          Field Original Value New Value
          Status New [ 10003 ] Open [ 1 ]
          jared.casey Jared Casey made changes -
          Fix Version/s 3.2.1 [ 17471 ]
          jared.casey Jared Casey made changes -
          Fix Version/s 3.2.0 [ 17249 ]
          Fix Version/s 3.2.1 [ 17471 ]
          jared.casey Jared Casey made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jared.casey Jared Casey made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          ingenthr Matt Ingenthron made changes -
          Workflow Couchbase SDK Workflow [ 197595 ] Couchbase SDK Workflow with Review [ 257545 ]

          People

            jared.casey Jared Casey
            jared.casey Jared Casey
            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