MCPcopy
hub / github.com/mongodb/node-mongodb-native / insert

Function insert

test/integration/crud/misc_cursors.test.ts:94–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 await collection.find().count();
93
94 async function insert() {
95 await collection.insertMany(Array.from({ length: 10 }, (_, i) => ({ x: i })));
96 }
97
98 async function finished() {
99 let count = await collection.find().count();

Callers 1

Calls 3

insertManyMethod · 0.80
insertOneMethod · 0.80
writeConcernMaxMethod · 0.80

Tested by

no test coverage detected