(dbPath: string)
| 31 | * actually exists. |
| 32 | */ |
| 33 | export function getDbFileVersion(dbPath: string): string { |
| 34 | const parts: string[] = [] |
| 35 | for (const p of [dbPath, `${dbPath}-wal`]) { |
| 36 | try { |
| 37 | const st = fs.statSync(p) |
| 38 | parts.push(`${Math.floor(st.mtimeMs)}:${st.size}`) |
| 39 | } catch { |
| 40 | parts.push('-') |
| 41 | } |
| 42 | } |
| 43 | return parts.join('|') |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Cache-first analytics read with version validation. |
no outgoing calls
no test coverage detected