* The journal mode actually in effect (e.g. 'wal', 'delete'). * * SQLite silently keeps the prior mode if WAL can't be enabled — e.g. on * filesystems without shared-memory support (some network/virtualized mounts, * WSL2 /mnt). So the effective mode can differ * from what `configureC
()
| 419 | * writer; anything else ⇒ they can. See issue #238. |
| 420 | */ |
| 421 | getJournalMode(): string { |
| 422 | const raw = this.db.pragma('journal_mode'); |
| 423 | const row = Array.isArray(raw) ? raw[0] : raw; |
| 424 | const mode = row && typeof row === 'object' |
| 425 | ? (row as Record<string, unknown>).journal_mode |
| 426 | : row; |
| 427 | return String(mode ?? '').toLowerCase(); |
| 428 | } |
| 429 | |
| 430 | /** |
| 431 | * Get current schema version |
no test coverage detected