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

Method find

test/asynchronous/test_cursor.py:519–520  ·  view source on GitHub ↗
(max_spec, expected_index)

Source from the content-addressed store, hash-verified

517 await db.test.insert_many([{"j": j, "k": j} for j in range(10)])
518
519 def find(max_spec, expected_index):
520 return db.test.find().max(max_spec).hint(expected_index)
521
522 cursor = find([("j", 3)], j_index)
523 self.assertEqual(len(await cursor.to_list()), 3)

Callers 15

callbackMethod · 0.45
opMethod · 0.45
opMethod · 0.45
test_op_msg.pyFile · 0.45
test_getmore_shardedMethod · 0.45
do_taskMethod · 0.45
read_json_fileFunction · 0.45
do_taskMethod · 0.45
test_command_optionsMethod · 0.45

Calls 3

hintMethod · 0.45
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected