pub fn carve_deleted_records(
db: &Database,
column_count: usize,
) -> Vec<CarvedRecord>Expand description
Recover deleted records by carving the database’s free (unallocated) pages.
Each free page from Database::freelist_pages is scanned with
Database::carve_cells for record-shaped cells of column_count columns.
Free pages hold only deallocated content, so the recovered rows are deleted
ones — the carver never re-surfaces a live (allocated) row. Recovered rows
are confidence-graded observations, not certainties: a carved record is
“consistent with a deleted row”, and the examiner draws the conclusion.
Read-only and panic-free: a malformed freelist simply yields fewer (or no) carved records rather than an error.