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

Method clear

graphlite/src/storage/multi_graph.rs:165–177  ·  view source on GitHub ↗

Clear all graphs

(&self)

Source from the content-addressed store, hash-verified

163
164 /// Clear all graphs
165 pub fn clear(&self) -> Result<(), StorageError> {
166 debug!("Clearing all graphs");
167
168 let mut graphs = self
169 .graphs
170 .write()
171 .map_err(|e| StorageError::LockError(format!("Failed to acquire write lock: {}", e)))?;
172
173 graphs.clear();
174
175 debug!("Successfully cleared all graphs");
176 Ok(())
177 }
178
179 /// Get the number of graphs
180 pub fn graph_count(&self) -> usize {

Callers 2

clear_cacheMethod · 0.45
clear_all_dataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected