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

Investigate changes in NODE-6290: Allow update to supply sort option

    • Type: Icon: Investigation Investigation
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      This ticket was split from DRIVERS-2822, please see that ticket for a detailed description.


      Use Case

      As a... Node.js driver user
      I want... to be able to control the document order that is used when matching a filter for updateOne and replaceOne operations
      So that... when a filter matches many documents the order is consistent

      User Experience

      • What is the desired/expected outcome for the user once this ticket is implemented?
        • Wherever updateOne and replaceOne operations are possible a sort can be attached. (ex. coll.updateOne() and client.bulkWrite([updateOne])

      Dependencies

      • None

      Risks/Unknowns

      • None

      Acceptance Criteria

      Implementation Requirements

      • Add typescript support for Sort on:
        • coll.updateOne and coll.replaceOne options
        • client bulkWrite updateOne and replaceOne operations
        • collection bulkWrite updateOne and replaceOne operations
      • Ensure updateMany does not support a sort option
      • Sync spec tests and ensure sort option is attached to the respective commands if specified
      • Update the Sort type definition to work correctly for readonly versions of supported configurations (ex. A (readonly) tuple of a field name to sort direction)

      Testing Requirements

      • Spec tests
      • Add typescript tests that illustrate the possible forms a sort configuration can take

      Documentation Requirements

      • The new sort option should have API docs attached

      Follow Up Requirements

      • None

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot TPM Jira Automations Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: