Implement opening an existing database file and reconstructing its in-memory Database metadata from the persisted System Catalog.
The operation validates the database superblock, opens the Pager, reads the System Catalog root, deserializes persisted table metadata, and populates the Database table registry.
Tasks
Acceptance Criteria
- An existing valid database opens successfully.
- The superblock is validated before metadata is used.
- Persisted tables are restored into memory.
- Persisted schemas, constraints, and indexes are restored.
- Index root page numbers survive reopening.
- Dropped objects are not loaded.
- Corrupt or incompatible database files fail safely.
- Partial catalog loading does not leak resources.
Depends On
- feat: Implement new Database creation lifecycle
- feat: Implement persisted system catalog
Implement opening an existing database file and reconstructing its in-memory Database metadata from the persisted System Catalog.
The operation validates the database superblock, opens the Pager, reads the System Catalog root, deserializes persisted table metadata, and populates the Database table registry.
Tasks
database_open()Acceptance Criteria
Depends On