* 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
()
| 646 | * writer; anything else ⇒ they can. See issue #238. |
| 647 | */ |
| 648 | getJournalMode(): string { |
| 649 | const raw = this.db.pragma('journal_mode'); |
| 650 | const row = Array.isArray(raw) ? raw[0] : raw; |
| 651 | const mode = row && typeof row === 'object' |
| 652 | ? (row as Record<string, unknown>).journal_mode |
| 653 | : row; |
| 654 | return String(mode ?? '').toLowerCase(); |
| 655 | } |
| 656 | |
| 657 | /** |
| 658 | * Get current schema version |
no test coverage detected