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

Nodejs atomic counter methods documentation

    XMLWordPrintable

Details

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

    Description

      In the Node.JS SDK 3.2, the atomic counter methods have moved to the BinaryCollection class - the increment() and decrement() methods from the legacy "bucket.counter() in 2.x SDK".

      However this is not covered in the SDK documentation, but part of the API reference.

      Attachments

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

        Activity

          Ajay Upputuri Atomic Counter is covered in https://docs.couchbase.com/nodejs-sdk/current/howtos/kv-operations.html#atomic-counters with examples like:

          // increment binary value by 1
          const result = await collection.binary().increment(binValKey, 1); 

          This seems to be consistent with what you're saying (collection.binary() returns a BinaryCollection)  so is this now covered, or are you still seeing issues elsewhere in the SDK docs?

          hakim.cassimally Hakim Cassimally added a comment - Ajay Upputuri  Atomic Counter is covered in https://docs.couchbase.com/nodejs-sdk/current/howtos/kv-operations.html#atomic-counters  with examples like: // increment binary value by 1 const result = await collection.binary().increment(binValKey, 1 ); This seems to be consistent with what you're saying (collection.binary() returns a BinaryCollection)  so is this now covered, or are you still seeing issues elsewhere in the SDK docs?

          Ajay Upputuri I've not heard back from you, and as commented, it looks like this is resolved.

          I'll close the issue now, but please do get in touch if you'd like us to have another look!

          hakim.cassimally Hakim Cassimally added a comment - Ajay Upputuri  I've not heard back from you, and as commented, it looks like this is resolved. I'll close the issue now, but please do get in touch if you'd like us to have another look!

          People

            hakim.cassimally Hakim Cassimally
            ajay.upputuri Ajay Upputuri
            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