MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / put_graph

Method put_graph

atomic-core/src/apply/graph_batch.rs:74–86  ·  view source on GitHub ↗
(
        &mut self,
        node: GraphNode<NodeId>,
        edge: SerializedGraphEdge,
    )

Source from the content-addressed store, hash-verified

72 }
73
74 pub fn put_graph(
75 &mut self,
76 node: GraphNode<NodeId>,
77 edge: SerializedGraphEdge,
78 ) -> PristineResult<bool> {
79 let key = encode_vertex(node.change.get(), node.start.get(), node.end.get());
80 let value = serialize_graph_edge(&edge);
81 let inserted = self.graph.insert(&key, &value)?;
82 self.index
83 .borrow_mut()
84 .note_write(node.change.get(), node.start.get(), node.end.get());
85 Ok(inserted)
86 }
87
88 pub fn put_inode_graph(
89 &mut self,

Calls 5

encode_vertexFunction · 0.85
serialize_graph_edgeFunction · 0.85
note_writeMethod · 0.80
getMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected