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

Method clone

pymongo/synchronous/cursor.py:251–259  ·  view source on GitHub ↗

Get a clone of this cursor. Returns a new Cursor instance with options matching those that have been set on the current instance. The clone will be completely unevaluated, even if the current instance has been partially or completely evaluated.

(self)

Source from the content-addressed store, hash-verified

249 return f"{self._dbname}.{self._collname}"
250
251 def clone(self) -> Cursor[_DocumentType]:
252 """Get a clone of this cursor.
253
254 Returns a new Cursor instance with options matching those that have
255 been set on the current instance. The clone will be completely
256 unevaluated, even if the current instance has been partially or
257 completely evaluated.
258 """
259 return self._clone(True)
260
261 def _clone(self, deepcopy: bool = True, base: Optional[Cursor] = None) -> Cursor: # type: ignore[type-arg]
262 """Internal clone helper."""

Callers 14

__getitem__Method · 0.95
explainMethod · 0.95
test_cursor_cloneMethod · 0.45
test_max_time_msMethod · 0.45
test_cloneMethod · 0.45
test_clone_emptyMethod · 0.45
test_cloneMethod · 0.45
test_cursor_cloneMethod · 0.45
test_max_time_msMethod · 0.45
test_cloneMethod · 0.45

Calls 1

_cloneMethod · 0.95

Tested by 12

test_cursor_cloneMethod · 0.36
test_max_time_msMethod · 0.36
test_cloneMethod · 0.36
test_clone_emptyMethod · 0.36
test_cloneMethod · 0.36
test_cursor_cloneMethod · 0.36
test_max_time_msMethod · 0.36
test_cloneMethod · 0.36
test_clone_emptyMethod · 0.36
test_cloneMethod · 0.36