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

Method insert_and_find

test/test_session.py:1247–1254  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1245 client.pymongo_test.collection2.drop()
1246
1247 def insert_and_find():
1248 cursor = collection.find().batch_size(1)
1249 for _ in range(10):
1250 # Advance the cluster time.
1251 collection.insert_one({})
1252 next(cursor)
1253
1254 cursor.close()
1255
1256 def insert_and_aggregate():
1257 cursor = (collection.aggregate([], batchSize=1)).batch_size(1)

Callers

nothing calls this directly

Calls 5

nextFunction · 0.90
batch_sizeMethod · 0.45
findMethod · 0.45
insert_oneMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected