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

Function Writer

test/unit/core/ui-react/hooks.test.tsx:770–879  ·  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

768};
769
770const Writer = ({
771 mode,
772 store,
773 queries,
774 checkpoints,
775 then,
776}: {
777 readonly mode: string;
778 readonly store?: Store;
779 readonly queries?: Queries;
780 readonly checkpoints?: Checkpoints;
781 readonly then: any;
782}) => {
783 const setRow = useSetRowCallback(
784 't1',
785 'r1',
786 () => ({c1: 2}),
787 [],
788 store,
789 then,
790 );
791 const setTables = useSetTablesCallback(
792 () => ({t1: {r1: {c1: 2}}}),
793 [],
794 store,
795 then,
796 );
797 const setTable = useSetTableCallback(
798 't1',
799 () => ({r1: {c1: 2}}),
800 [],
801 store,
802 then,
803 );
804 const addRow = useAddRowCallback('t1', () => ({c1: 3}), [], store, then);
805 const setPartialRow = useSetPartialRowCallback(
806 't1',
807 'r1',
808 () => ({c2: 2}),
809 [],
810 store,
811 then,
812 );
813 const setCell = useSetCellCallback(
814 't1',
815 'r1',
816 'c1',
817 () => 'changed',
818 [],
819 store,
820 then,
821 );
822 const delCell = useDelCellCallback('t1', 'r1', 'c1', true, store, then);
823 const setValues = useSetValuesCallback(() => ({v1: 4}), [], store, then);
824 const setPartialValues = useSetPartialValuesCallback(
825 () => ({v2: 2}),
826 [],
827 store,

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…