Check if catalog data exists
(&self)
| 468 | |
| 469 | /// Check if catalog data exists |
| 470 | pub fn has_catalog_data(&self) -> Result<bool, StorageError> { |
| 471 | if let Some(persistent_store) = &self.persistent_store { |
| 472 | if let Some(driver) = &self.storage_driver { |
| 473 | persistent_store |
| 474 | .has_catalog_data(driver.as_ref().as_ref()) |
| 475 | .map_err(|e| { |
| 476 | StorageError::PersistenceError(format!( |
| 477 | "Failed to check catalog data: {}", |
| 478 | e |
| 479 | )) |
| 480 | }) |
| 481 | } else { |
| 482 | Ok(false) |
| 483 | } |
| 484 | } else if let Some(memory_store) = &self.memory_store { |
| 485 | if let Some(driver) = &self.storage_driver { |
| 486 | memory_store |
| 487 | .has_catalog_data(driver.as_ref().as_ref()) |
| 488 | .map_err(|e| { |
| 489 | StorageError::PersistenceError(format!( |
| 490 | "Failed to check catalog data: {}", |
| 491 | e |
| 492 | )) |
| 493 | }) |
| 494 | } else { |
| 495 | Ok(false) |
| 496 | } |
| 497 | } else { |
| 498 | Ok(false) |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | /// Clear only the in-memory cache (not persistent storage) |
| 503 | pub fn clear_cache(&self) -> Result<(), StorageError> { |
nothing calls this directly
no outgoing calls
no test coverage detected