Closed qingyang-hu closed 2 weeks ago
Removing myself, I'll defer to Jeremy + the bulk write spec authors.
@qingyang-hu: Please ping me for another review once the Bulk Write spec/tests are updated.
@jmikola, can you please take a look again? I've added the sort to the client-level bulk write.
@jmikola, can you please review the updates?
Summary
Add a sort option to
updateOne()
so if it matches more than one candidate document the first one matched by the sort order will be updated.Background & Motivation
The new syntax allows a sort option to be supplied to an update command. The upstream server changes are at https://jira.mongodb.org/browse/SERVER-78140.
Some example commands can be found at: https://github.com/mongodb/mongo/commit/e443421240f5a111e19cf0870ff4f545deecea8c#diff-c9ff788fbdeb3594c45d85c449a[…]21f5ef32ede8f9c858e6e3072e0c8R27
The corresponding mongosh docs: https://www.mongodb.com/docs/upcoming/reference/method/db.collection.updateOne/ Though the command docs have not been updated yet.
Please complete the following before merging: