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

Method find

test/test_cursor.py:511–512  ·  view source on GitHub ↗
(max_spec, expected_index)

Source from the content-addressed store, hash-verified

509 db.test.insert_many([{"j": j, "k": j} for j in range(10)])
510
511 def find(max_spec, expected_index):
512 return db.test.find().max(max_spec).hint(expected_index)
513
514 cursor = find([("j", 3)], j_index)
515 self.assertEqual(len(cursor.to_list()), 3)

Callers 15

test_command_optionsMethod · 0.45
test_alt_collectionMethod · 0.45
test_gridfs_findMethod · 0.45
create_resourceMethod · 0.45
test_gridfs_findMethod · 0.45
test_distinctMethod · 0.45
test_find_commandMethod · 0.45
test_explain_commandMethod · 0.45
test_cursor_collationMethod · 0.45

Calls 3

hintMethod · 0.45
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected