Open one legacy file exclusively, upgrading a redb 2.x file in place. # Errors Fails with `DatabaseAlreadyOpen` when another handle holds the file, and with an I/O `NotFound` when the file no longer exists.
(&mut self, path: &Path)
| 78 | /// Fails with `DatabaseAlreadyOpen` when another handle holds the file, |
| 79 | /// and with an I/O `NotFound` when the file no longer exists. |
| 80 | pub fn add(&mut self, path: &Path) -> PristineResult<()> { |
| 81 | let database = open_database(path, false, MERGE_CACHE_BYTES)?; |
| 82 | check_schema_version(&database.begin_read()?)?; |
| 83 | require_supported_repository_capabilities(&database.begin_read()?)?; |
| 84 | self.sources.push((path.to_path_buf(), database)); |
| 85 | Ok(()) |
| 86 | } |
| 87 | |
| 88 | /// Write the merged database to `target` and verify it. |
| 89 | /// |
no test coverage detected