MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / hasSchemalessDb

Function hasSchemalessDb

src/directory.ts:166–172  ·  view source on GitHub ↗
(projectRoot: string)

Source from the content-addressed store, hash-verified

164 * see {@link hasForeignDbFile}.
165 */
166export function hasSchemalessDb(projectRoot: string): boolean {
167 const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
168 let st: fs.Stats;
169 try { st = fs.statSync(dbPath); } catch { return false; }
170 if (!st.isFile() || isInitialized(projectRoot)) return false;
171 return st.size === 0 || probeSchema(dbPath) === 'no-schema';
172}
173
174/**
175 * `codegraph.db` exists at `projectRoot` and is not a SQLite database (no

Callers 2

runInitFunction · 0.90

Calls 4

getCodeGraphDirFunction · 0.85
isInitializedFunction · 0.85
probeSchemaFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected