Open an existing pristine database in read-only mode This method opens the database without acquiring a write lock, allowing concurrent read access from multiple processes. It's suitable for read-only operations like `status`, `diff`, `log`, and `change`. # Errors Returns an error if: - The database file doesn't exist - The database is corrupted - Read access cannot be obtained # Example ```i
(path: P)
| 224 | /// // Read operations... |
| 225 | /// ``` |
| 226 | pub fn open_readonly<P: AsRef<Path>>(path: P) -> PristineResult<Self> { |
| 227 | // Open database without creating (read-only mode) |
| 228 | // Use the same 8 GiB cache as open() for consistent performance. |
| 229 | let cache_bytes = 8 * 1024 * 1024 * 1024; // 8 GiB |
| 230 | let db = Builder::new().set_cache_size(cache_bytes).open(path)?; |
| 231 | Self::scan_ids(db) |
| 232 | } |
| 233 | |
| 234 | /// Scan existing tables for the next available IDs. |
| 235 | /// |