Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories MongoDB Shell
Created by Guest
Created on Dec 7, 2020

Explain shell helpers for CRUD API

The .explain() method in the shell works with some write methods (update, remove, findAndModify), but it doesn't work with the newer CRUD API. The missing explain methods are: "deleteMany", "deleteOne", "findOne", "findOneAndDelete", "findOneAndReplace", "findOneAndUpdate", "insertMany", "insertOne", "replaceOne", "updateMany", "updateOne" I think this would be especially helpful for new hires: explain is a good way to quickly find the code that implements a command.