Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3568

Make findOneAnd family of methods spec compliant

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Unknown
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.0
    • Component/s: None
    • Labels:
      None

      Description

      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

      • CRUD API

      Unknowns

      • none

      Acceptance Criteria

      Implementation Requirements

      • Make the findOneAnd functions spec compliant
      • make sure findOne() also returns results consistent with the other methods (i.e., null instead of undefined)

      Testing Requirements

      • modify spec test runner to no longer access the value property
      • Add a test that asserts the other result type is no longer returned

      Documentation Requirements

      • Capture this in a major version change log

      Follow Up Requirements

      • DOCS ticket for updated examples

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken Neal Beeken
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: