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

Method new

graphlite/src/storage/graph_cache.rs:41–51  ·  view source on GitHub ↗

Create a new empty graph

()

Source from the content-addressed store, hash-verified

39impl GraphCache {
40 /// Create a new empty graph
41 pub fn new() -> Self {
42 Self {
43 schema_id: None,
44 nodes: HashMap::new(),
45 edges: HashMap::new(),
46 node_labels: HashMap::new(),
47 edge_labels: HashMap::new(),
48 adjacency_out: HashMap::new(),
49 adjacency_in: HashMap::new(),
50 }
51 }
52
53 /// Add a node to the graph
54 pub fn add_node(&mut self, node: Node) -> Result<(), GraphError> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected