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

Method remove_option

pymongo/synchronous/cursor.py:382–396  ·  view source on GitHub ↗

Unset arbitrary query flags using a bitmask. To unset the tailable flag: cursor.remove_option(2)

(self, mask: int)

Source from the content-addressed store, hash-verified

380 return self
381
382 def remove_option(self, mask: int) -> Cursor[_DocumentType]:
383 """Unset arbitrary query flags using a bitmask.
384
385 To unset the tailable flag:
386 cursor.remove_option(2)
387 """
388 if not isinstance(mask, int):
389 raise TypeError(f"mask must be an int, not {type(mask)}")
390 self._check_okay_to_chain()
391
392 if mask & _QUERY_OPTIONS["exhaust"]:
393 self._exhaust = False
394
395 self._query_flags &= ~mask
396 return self
397
398 def allow_disk_use(self, allow_disk_use: bool) -> Cursor[_DocumentType]:
399 """Specifies whether MongoDB can use temporary disk files while

Calls 1

_check_okay_to_chainMethod · 0.95