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

Function updateMany

packages/core/fumadb/src/query/orm/index.ts:597–612  ·  view source on GitHub ↗
(name, { set, where })

Source from the content-addressed store, hash-verified

595 return record;
596 },
597 async updateMany(name, { set, where }) {
598 const table = toTable(name);
599 let conditions = where ? buildCondition(table.columns, where) : undefined;
600 if (conditions === true) conditions = undefined;
601 if (conditions === false) return;
602
603 const constrainedWhere = await applyUpdatePolicies(
604 table,
605 conditions,
606 set,
607 context,
608 "update",
609 );
610 if (constrainedWhere === false) return;
611 return internal.updateMany(table, { set, where: constrainedWhere });
612 },
613 async transaction(run) {
614 return internal.transaction((transactionInstance) =>
615 run(withQueryContext(transactionInstance, context)),

Callers

nothing calls this directly

Calls 3

buildConditionFunction · 0.90
toTableFunction · 0.85
applyUpdatePoliciesFunction · 0.85

Tested by

no test coverage detected