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

Method gen_unordered

pymongo/synchronous/bulk.py:231–241  ·  view source on GitHub ↗

Generate batches of operations, batched by type of operation, in arbitrary order.

(self)

Source from the content-addressed store, hash-verified

229 yield run
230
231 def gen_unordered(self) -> Iterator[_Run]:
232 """Generate batches of operations, batched by type of
233 operation, in arbitrary order.
234 """
235 operations = [_Run(_INSERT), _Run(_UPDATE), _Run(_DELETE)]
236 for idx, (op_type, operation) in enumerate(self.ops):
237 operations[op_type].add(idx, operation)
238
239 for run in operations:
240 if run.ops:
241 yield run
242
243 @_handle_reauth
244 def write_command(

Callers 1

executeMethod · 0.95

Calls 2

_RunClass · 0.90
addMethod · 0.80

Tested by

no test coverage detected