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

Method has_catalog_data

graphlite/src/storage/data_adapter.rs:262–270  ·  view source on GitHub ↗

Check if the database contains saved catalog data

(
        &self,
        driver: &dyn StorageDriver<Tree = Box<dyn StorageTree>>,
    )

Source from the content-addressed store, hash-verified

260
261 /// Check if the database contains saved catalog data
262 pub fn has_catalog_data(
263 &self,
264 driver: &dyn StorageDriver<Tree = Box<dyn StorageTree>>,
265 ) -> Result<bool, Box<dyn std::error::Error>> {
266 let catalog_tree = driver.open_tree("catalog")?;
267 catalog_tree
268 .contains_key(b"catalog_data")
269 .map_err(|e| e.into())
270 }
271
272 /// Clear all data from the database
273 pub fn clear(

Callers

nothing calls this directly

Calls 2

open_treeMethod · 0.45
contains_keyMethod · 0.45

Tested by

no test coverage detected