def max_scan(self, max_scan: int) -> 'Cursor':
"""Limit the number of documents to scan when performing the query.
Raises :class:`~pymongo.errors.InvalidOperation` if this
cursor has already been used. Only the last :meth:`max_scan`
applied to this cursor has any effect.
:Parameters:
- `max_scan`: the maximum number of documents to scan
"""
self.__check_okay_to_chain()
self.__max_scan = max_scan
return self
评论列表
文章目录