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

Function getViewContext

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

Source from the content-addressed store, hash-verified

768
769const viewContextCache: Partial<Record<SheetViewMode, ViewContext>> = {};
770const getViewContext = (view: SheetViewMode): ViewContext => {
771 const existed = viewContextCache[view];
772 if (existed) return existed;
773 const ctx = buildViewContext(view);
774 viewContextCache[view] = ctx;
775 return ctx;
776};
777
778// ---- side effects (initialized lazily on first use) ------------------------
779

Callers 5

onCurrentTabChangedFunction · 0.85
myFunction · 0.85
sharedFunction · 0.85
draftFunction · 0.85
useSheetContextByViewFunction · 0.85

Calls 1

buildViewContextFunction · 0.85

Tested by

no test coverage detected