MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / createMany

Function createMany

packages/core/fumadb/src/adapters/mongodb/query.ts:438–444  ·  view source on GitHub ↗
(table, values)

Source from the content-addressed store, hash-verified

436 return mapResult(result, table);
437 },
438 async createMany(table, values) {
439 const idField = table.getIdColumn().names.mongodb;
440 values = values.map((v) => mapInsertValues(v, table));
441
442 await db.collection(table.names.mongodb).insertMany(values, { session });
443 return values.map((value) => ({ _id: value[idField] }));
444 },
445 async deleteMany(table, v) {
446 const where = v.where ? buildWhere(v.where) : undefined;
447

Callers

nothing calls this directly

Calls 1

mapInsertValuesFunction · 0.85

Tested by

no test coverage detected