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

Cursor project function should return a new parameterized cursor for correct type completion

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed

      Use Case

      As a Typescript user
      I want the cursor's project method to return a cursor that correctly reflects the changes made to the schema based upon the projection I applied to the cursor
      So that I have type safety.

      Dependencies

      • Our type definitions

      Unknowns

      • n/a

      Acceptance Criteria

      Implementation Requirements
      • project returns a parameterized cursor that has the proper schema defined based on the modification that the projection made.
      Testing Requirements
      • Add a regression test to ensure this feature isn't lost
      • Add tests to check a few variations of projections, removing keys, removing none, removing all keys
      Documentation Requirements
      • The tsdoc for the function should make it clear that it does not initiate a new cursor. Look to cursor#map for an example of what to call out.
      Follow Up Requirements
      • n/a

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: