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