MCPcopy Index your code
hub / github.com/simstudioai/sim / applyExecutionsPatch

Function applyExecutionsPatch

apps/sim/lib/table/rows/executions.ts:196–210  ·  view source on GitHub ↗
(
  existing: RowExecutions,
  patch: Record<string, RowExecutionMetadata | null> | undefined
)

Source from the content-addressed store, hash-verified

194
195/** Merges an `executionsPatch` into the row's existing executions blob. */
196export function applyExecutionsPatch(
197 existing: RowExecutions,
198 patch: Record<string, RowExecutionMetadata | null> | undefined
199): RowExecutions {
200 if (!patch) return existing
201 const next: RowExecutions = { ...existing }
202 for (const [gid, value] of Object.entries(patch)) {
203 if (value === null) {
204 delete next[gid]
205 } else {
206 next[gid] = value
207 }
208 }
209 return next
210}
211
212/**
213 * Writes a per-group execution patch for one row against the `tableRowExecutions`

Callers 2

updateRowFunction · 0.90
batchUpdateRowsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected