(projectRoot: string)
| 164 | * see {@link hasForeignDbFile}. |
| 165 | */ |
| 166 | export 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 |
no test coverage detected