MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / _supports_exhaust

Method _supports_exhaust

pymongo/asynchronous/cursor.py:227–234  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

225 self._exhaust_checked = False
226
227 async def _supports_exhaust(self) -> None:
228 # Exhaust cursor support
229 if self._cursor_type == CursorType.EXHAUST:
230 if await self._collection.database.client.is_mongos:
231 raise InvalidOperation("Exhaust cursors are not supported by mongos")
232 if self._limit:
233 raise InvalidOperation("Can't use limit and exhaust together.")
234 self._exhaust = True
235
236 @property
237 def collection(self) -> AsyncCollection[_DocumentType]:

Callers 3

__init__Method · 0.95
nextMethod · 0.95
_next_batchMethod · 0.95

Calls 1

InvalidOperationClass · 0.90

Tested by

no test coverage detected