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

Function getFolderContext

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

Source from the content-addressed store, hash-verified

514
515const folderContextCache: Partial<Record<SheetViewMode, FolderContext>> = {};
516const getFolderContext = (view: SheetViewMode): FolderContext => {
517 const existed = folderContextCache[view];
518 if (existed) return existed;
519 const ctx = buildFolderContext(view);
520 folderContextCache[view] = ctx;
521 return ctx;
522};
523
524const viewEvents: Partial<Record<SheetViewMode, SheetTreeEvents>> = {};
525const getEvents = (view: SheetViewMode): SheetTreeEvents => {

Callers 6

getPathesForWorksheetFunction · 0.85
getPwdForWorksheetFunction · 0.85
getFoldersForWorksheetFunction · 0.85
buildTreeFunction · 0.85
rebuildTreeImplFunction · 0.85
buildViewContextFunction · 0.85

Calls 1

buildFolderContextFunction · 0.85

Tested by

no test coverage detected