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

Method add

pymongo/bulk_shared.py:61–69  ·  view source on GitHub ↗

Add an operation to this Run instance. :param original_index: The original index of this operation within a larger bulk operation. :param operation: The operation document.

(self, original_index: int, operation: Any)

Source from the content-addressed store, hash-verified

59 return self.index_map[idx]
60
61 def add(self, original_index: int, operation: Any) -> None:
62 """Add an operation to this Run instance.
63
64 :param original_index: The original index of this operation
65 within a larger bulk operation.
66 :param operation: The operation document.
67 """
68 self.index_map.append(original_index)
69 self.ops.append(operation)
70
71
72def _merge_command(

Callers 15

print_running_clientsFunction · 0.80
tearDownMethod · 0.80
__init__Method · 0.80
test_zero_latencyMethod · 0.80
test_nearestMethod · 0.80
record_a_readMethod · 0.80
_test_fnMethod · 0.80
check_log_messagesMethod · 0.80
testFunction · 0.80

Calls

no outgoing calls

Tested by 15

tearDownMethod · 0.64
test_zero_latencyMethod · 0.64
test_nearestMethod · 0.64
record_a_readMethod · 0.64
_test_fnMethod · 0.64
testFunction · 0.64
asyncTearDownMethod · 0.64
test_zero_latencyMethod · 0.64