MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / explain

Method explain

pymongo/synchronous/cursor.py:1207–1213  ·  view source on GitHub ↗

Returns an explain plan record for this cursor. .. seealso:: The MongoDB documentation on `explain `_.

(self)

Source from the content-addressed store, hash-verified

1205 return cast(List["_DocumentOut"], raw_response)
1206
1207 def explain(self) -> _DocumentType:
1208 """Returns an explain plan record for this cursor.
1209
1210 .. seealso:: The MongoDB documentation on `explain <https://dochub.mongodb.org/core/explain>`_.
1211 """
1212 clone = self._clone(deepcopy=True, base=Cursor(self.collection))
1213 return clone.explain()
1214
1215 def __getitem__(self, index: Any) -> NoReturn:
1216 raise InvalidOperation("Cannot call __getitem__ on RawBatchCursor")

Callers

nothing calls this directly

Calls 3

CursorClass · 0.85
_cloneMethod · 0.45
explainMethod · 0.45

Tested by

no test coverage detected