-
Type:
Investigation
-
Resolution: Unresolved
-
Priority:
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
- depends on
-
NODE-6290 Allow update to supply sort option
-
- Closed
-