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

Method remove_graph

graphlite/src/storage/multi_graph.rs:103–117  ·  view source on GitHub ↗

Remove a graph by name

(&self, name: &str)

Source from the content-addressed store, hash-verified

101
102 /// Remove a graph by name
103 pub fn remove_graph(&self, name: &str) -> Result<(), StorageError> {
104 debug!("Removing graph: {}", name);
105 let mut graphs = self
106 .graphs
107 .write()
108 .map_err(|e| StorageError::LockError(format!("Failed to acquire write lock: {}", e)))?;
109
110 if graphs.remove(name).is_some() {
111 debug!("Successfully removed graph: {}", name);
112 } else {
113 warn!("Attempted to remove non-existent graph: {}", name);
114 }
115
116 Ok(())
117 }
118
119 /// Perform a graph union operation
120 pub fn union_graphs(

Callers 2

delete_graphMethod · 0.45

Calls 1

removeMethod · 0.45

Tested by 1