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

Misleading example for using CAS in node client

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None

    Description

      The example for using CAS here shows using CAS for node as ...

      new_result = cb1.replace(
             'docid',
             new_doc,
             cas=cur_cas)
      

       But it should be ...

      new_result = cb1.replace(
             'docid',
             new_doc,
             {cas: cur_cas})
      

      There aren't many good examples for node.js, let alone w/CAS.  Found test case on line 316 [in the source git|https://github.com/couchbase/couchnode/blob/master/test/crud.test.js] that shows correct usage.

       

      Attachments

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

        Activity

          These particular examples are in Python-style pseudocode.
          I will add some text to that effect to each CAS page that does not yet mention it.

          richard.smedley Richard Smedley added a comment - These particular examples are in Python-style pseudocode. I will add some text to that effect to each CAS page that does not yet mention it.

          People

            richard.smedley Richard Smedley
            david.brown David Brown (Inactive)
            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