Method
_set_hint
(self, index: Optional[_Hint])
Source from the content-addressed store, hash-verified
| 756 | return next(c) |
| 757 | |
| 758 | def _set_hint(self, index: Optional[_Hint]) -> None: |
| 759 | if index is None: |
| 760 | self._hint = None |
| 761 | return |
| 762 | |
| 763 | if isinstance(index, str): |
| 764 | self._hint = index |
| 765 | else: |
| 766 | self._hint = helpers_shared._index_document(index) |
| 767 | |
| 768 | def hint(self, index: Optional[_Hint]) -> Cursor[_DocumentType]: |
| 769 | """Adds a 'hint', telling Mongo the proper index to use for the query. |
Tested by
no test coverage detected