Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7088

Investigate changes in NODE-3568: Make findOneAnd family of methods spec compliant by default

    • Type: Icon: Investigation Investigation
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed
    • Iteration Iguanodon

      Use Case

      As a driver engineer I want to reduce the difference between node and common driver's spec. Currently our findOneAnd* methods return a wrapped type for the findOneAnd* functions.

      User Impact

      • This will be a breaking change that will make the ok and lastErrorObject properties inaccessible.
      • ok's value is implicit by the method not throwing
      • lastErrorObject should likely convert to an error as well so there's no need to provide a way to access it.

      Dependencies

      Unknowns

      • none

      Acceptance Criteria

      Implementation Requirements

      • Make the findOneAnd functions spec compliant by default: update `includeResultMetadata` to default to false
      • make sure findOne() also returns results consistent with the other methods (i.e., null instead of undefined for both flag settings)

      Testing Requirements

      • modify spec test runner to no longer access the value property
      • update the default behavior tests
      • update any tangential tests that rely on the default behavior to access the value directly or to use the explicit flag setting

      Documentation Requirements

      • Document change in the migration guide
      • DOCSP ticket to update any documented defaults and examples

      Follow Up Requirements

      • Heads up to dev tools & mongoose

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: