MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / load_all

Method load_all

graphlite/src/catalog/registry.rs:195–219  ·  view source on GitHub ↗

Load all catalogs from storage Iterates through all registered catalogs and loads their state from storage using the catalog's load method. # Returns `Ok(())` if all catalogs loaded successfully `Err(CatalogError)` if any catalog failed to load

(&mut self)

Source from the content-addressed store, hash-verified

193 /// * `Ok(())` if all catalogs loaded successfully
194 /// * `Err(CatalogError)` if any catalog failed to load
195 pub fn load_all(&mut self) -> CatalogResult<()> {
196 for (name, catalog) in &mut self.catalogs {
197 log::debug!("Loading catalog '{}'", name);
198
199 // Load catalog provider data from storage if it exists
200 if let Some(data) = self.storage.load_catalog_provider(name).map_err(|e| {
201 CatalogError::OperationFailed(format!("Failed to load catalog '{}': {}", name, e))
202 })? {
203 catalog.load(&data).map_err(|e| {
204 CatalogError::OperationFailed(format!(
205 "Failed to deserialize catalog '{}': {}",
206 name, e
207 ))
208 })?;
209
210 log::debug!("Loaded catalog '{}': {} bytes", name, data.len());
211 } else {
212 log::debug!(
213 "No stored data found for catalog '{}', using empty state",
214 name
215 );
216 }
217 }
218 Ok(())
219 }
220
221 /// Get reference to the storage manager
222 ///

Callers

nothing calls this directly

Calls 2

load_catalog_providerMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected