MCPcopy Create free account
hub / github.com/bytebase/bytebase / getRebuildTreeFn

Function getRebuildTreeFn

frontend/src/views/sql-editor/Sheet/context.ts:695–704  ·  view source on GitHub ↗
(view: SheetViewMode)

Source from the content-addressed store, hash-verified

693
694const rebuildTreeDebounced: Partial<Record<SheetViewMode, () => void>> = {};
695const getRebuildTreeFn = (view: SheetViewMode): (() => void) => {
696 const existed = rebuildTreeDebounced[view];
697 if (existed) return existed;
698 const debounced = debounce(
699 () => rebuildTreeImpl(view),
700 DEBOUNCE_SEARCH_DELAY
701 );
702 rebuildTreeDebounced[view] = debounced;
703 return debounced;
704};
705
706const fetchSheetListFor = async (view: SheetViewMode) => {
707 const state = useSheetContextStore.getState();

Callers 2

buildViewContextFunction · 0.85
bindWatchersFunction · 0.85

Calls 1

rebuildTreeImplFunction · 0.85

Tested by

no test coverage detected