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

Function getOrCreateTable

src/store/index.ts:878–884  ·  view source on GitHub ↗
(tableId: Id)

Source from the content-addressed store, hash-verified

876 };
877
878 const getOrCreateTable = (tableId: Id) =>
879 mapEnsure(tablesMap, tableId, () => {
880 tableIdsChanged(tableId, 1);
881 mapSet(tablePoolFunctions, tableId, getPoolFunctions());
882 mapSet(tableCellIds, tableId, mapNew());
883 return mapNew();
884 });
885
886 const delValidTable = (tableId: Id): TableMap => {
887 if (whileMutating(() => middleware[8]?.(tableId)) ?? true) {

Callers 4

setRowFunction · 0.70
addRowFunction · 0.70
setPartialRowFunction · 0.70
setCellFunction · 0.70

Calls 5

mapEnsureFunction · 0.90
mapSetFunction · 0.90
getPoolFunctionsFunction · 0.90
mapNewFunction · 0.90
tableIdsChangedFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…