pub fn wal_commit_count_at(dir: &Path) -> Result<u64>Expand description
Return the number of valid WAL commits in the database at dir.
Useful for displaying “as-of commit N of M” in CLIs without opening the
full database. Returns 0 if the WAL file does not exist (e.g., after
snapshot() which truncates it to empty).