( existing: RowExecutions, patch: Record<string, RowExecutionMetadata | null> | undefined )
| 194 | |
| 195 | /** Merges an `executionsPatch` into the row's existing executions blob. */ |
| 196 | export 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` |
no outgoing calls
no test coverage detected