MCPcopy Create free account
hub / github.com/tinyplex/tinybase / addRow

Function addRow

docs/pseudo.esm.sh/tinybase@9.0.0/ui-solid-inspector/index.js:2396–2408  ·  view source on GitHub ↗
(tableId, row, reuseRowIds = true)

Source from the content-addressed store, hash-verified

2394 rowId
2395 );
2396 const addRow = (tableId, row, reuseRowIds = true) => transaction(() => {
2397 let rowId = void 0;
2398 if (validateRow(tableId, rowId, row)) {
2399 tableId = id(tableId);
2400 setValidRow(
2401 tableId,
2402 getOrCreateTable(tableId),
2403 rowId = getNewRowId(tableId, reuseRowIds ? 1 : 0),
2404 row
2405 );
2406 }
2407 return rowId;
2408 });
2409 const setPartialRow = (tableId, rowId, partialRow) => fluentTransaction(
2410 (tableId2, rowId2) => {
2411 if (validateRow(tableId2, rowId2, partialRow, 1)) {

Callers

nothing calls this directly

Calls 6

transactionFunction · 0.70
validateRowFunction · 0.70
idFunction · 0.70
setValidRowFunction · 0.70
getOrCreateTableFunction · 0.70
getNewRowIdFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…