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

Function Writer

test/unit/core/ui-solid/primitives.test.ts:715–812  ·  view source on GitHub ↗
({
  mode,
  store,
  queries,
  checkpoints,
  then,
}: {
  readonly mode: string;
  readonly store?: Store;
  readonly queries?: Queries;
  readonly checkpoints?: Checkpoints;
  readonly then: any;
})

Source from the content-addressed store, hash-verified

713};
714
715const Writer = ({
716 mode,
717 store,
718 queries,
719 checkpoints,
720 then,
721}: {
722 readonly mode: string;
723 readonly store?: Store;
724 readonly queries?: Queries;
725 readonly checkpoints?: Checkpoints;
726 readonly then: any;
727}) => {
728 const setRow = useSetRowCallback('t1', 'r1', () => ({c1: 2}), store, then);
729 const setTables = useSetTablesCallback(
730 () => ({t1: {r1: {c1: 2}}}),
731 store,
732 then,
733 );
734 const setTable = useSetTableCallback(
735 't1',
736 () => ({r1: {c1: 2}}),
737 store,
738 then,
739 );
740 const addRow = useAddRowCallback('t1', () => ({c1: 3}), store, then);
741 const setPartialRow = useSetPartialRowCallback(
742 't1',
743 'r1',
744 () => ({c2: 2}),
745 store,
746 then,
747 );
748 const setCell = useSetCellCallback(
749 't1',
750 'r1',
751 'c1',
752 () => 'changed',
753 store,
754 then,
755 );
756 const delCell = useDelCellCallback('t1', 'r1', 'c1', true, store, then);
757 const setValues = useSetValuesCallback(() => ({v1: 4}), store, then);
758 const setPartialValues = useSetPartialValuesCallback(
759 () => ({v2: 2}),
760 store,
761 then,
762 );
763 const setValue = useSetValueCallback('v1', () => 2, store, then);
764 const setParamValues = useSetParamValuesCallback(
765 'q1',
766 () => ({p1: 'value'}),
767 queries,
768 then,
769 );
770 const setParamValue = useSetParamValueCallback(
771 'q1',
772 'p1',

Callers

nothing calls this directly

Calls 15

useSetRowCallbackFunction · 0.90
useSetTablesCallbackFunction · 0.90
useSetTableCallbackFunction · 0.90
useAddRowCallbackFunction · 0.90
useSetPartialRowCallbackFunction · 0.90
useSetCellCallbackFunction · 0.90
useDelCellCallbackFunction · 0.90
useSetValuesCallbackFunction · 0.90
useSetValueCallbackFunction · 0.90
useSetParamValueCallbackFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…