MCPcopy
hub / github.com/tinyplex/tinybase / cellChanged

Function cellChanged

src/mergeable-store/index.ts:335–378  ·  view source on GitHub ↗
(
    tableId: Id,
    rowId: Id,
    cellId: Id,
    newCell: CellOrUndefined,
    mutating: 0 | 1,
    defaulted: 0 | 1,
  )

Source from the content-addressed store, hash-verified

333 };
334
335 const cellChanged = (
336 tableId: Id,
337 rowId: Id,
338 cellId: Id,
339 newCell: CellOrUndefined,
340 mutating: 0 | 1,
341 defaulted: 0 | 1,
342 ) => {
343 setAdd(
344 mapEnsure(
345 mapEnsure(touchedCells, tableId, mapNew<Id, IdSet>),
346 rowId,
347 setNew<Id>,
348 ),
349 cellId,
350 );
351 if (listeningToRawStoreChanges || mutating) {
352 if (mutating) {
353 mutated = 1;
354 }
355 mergeContentOrChanges([
356 [
357 {
358 [tableId]: [
359 {
360 [rowId]: [
361 {
362 [cellId]: [
363 newCell,
364 defaultingContent || defaulted
365 ? EMPTY_STRING
366 : getNextHlc(),
367 ],
368 },
369 ],
370 },
371 ],
372 },
373 ],
374 [{}],
375 1,
376 ]);
377 }
378 };
379
380 const valueChanged = (
381 valueId: Id,

Callers

nothing calls this directly

Calls 4

setAddFunction · 0.90
mapEnsureFunction · 0.90
mergeContentOrChangesFunction · 0.70
getNextHlcFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…