Write operations like update, updateOne, replaceOne, etc. often have more results than modifiedCount. In my case, I'd like to access matchedCount to see if my filter actually got any hits. What do you think about returning to these callbacks not only modifiedCount, but as a third parameter the raw operation result so we can access these? The callback would use the signature function (error, count, results) in these cases.
I'm able to open a PR with updated testing and documentation if you think that's a good idea.
Write operations like update, updateOne, replaceOne, etc. often have more results than
modifiedCount
. In my case, I'd like to accessmatchedCount
to see if my filter actually got any hits. What do you think about returning to these callbacks not onlymodifiedCount
, but as a third parameter the raw operation result so we can access these? The callback would use the signaturefunction (error, count, results)
in these cases.I'm able to open a PR with updated testing and documentation if you think that's a good idea.