Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • 4.2.4
    • library
    • 0

    Description

      I believe the Node.JS SDK suffers from inconsistent types :

      // Returns `MutateInResult`, missing the `MutationToken`
      cb.collection('foo').mutateIn(docKey, [MutateInSpec.replace('field', value)]);
       
      // Returns `MutationResult`, which rightfully includes the `MutationToken`
      cb.collection('foo').replace(docKey, value);
       
      // Returns `MutationResult`, which include the `Cas`, probably wrongfully ?
      cb.collection('foo').remove(docKey);
      

      PS : I did not mark this as a bug since it's not a runtime error, but I still prevent you from accessing data that is probably there.

      Attachments

        Issue Links

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

          Activity

            People

              jared.casey Jared Casey
              JesusTheHun Jonathan MASSUCHETTI
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Gerrit Reviews

                    There are no open Gerrit changes

                    PagerDuty