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

Function updateMany

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

Source from the content-addressed store, hash-verified

413 return record;
414 },
415 async updateMany(name, { set, where }) {
416 const table = toTable(name);
417 let conditions = where ? buildCondition(table.columns, where) : undefined;
418 if (conditions === true) conditions = undefined;
419 if (conditions === false) return;
420
421 const constrainedWhere = await applyUpdatePolicies(
422 table,
423 conditions,
424 set,
425 context,
426 "update",
427 );
428 if (constrainedWhere === false) return;
429 return internal.updateMany(table, { set, where: constrainedWhere });
430 },
431 async transaction(run) {
432 return internal.transaction((transactionInstance) =>
433 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