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

Method put_graph

atomic-core/src/pristine/txn/write/mod.rs:928–938  ·  view source on GitHub ↗
(
        &mut self,
        node: GraphNode<NodeId>,
        edge: SerializedGraphEdge,
    )

Source from the content-addressed store, hash-verified

926 }
927
928 fn put_graph(
929 &mut self,
930 node: GraphNode<NodeId>,
931 edge: SerializedGraphEdge,
932 ) -> PristineResult<bool> {
933 let mut table = self.txn.open_multimap_table(GRAPH)?;
934 let key = encode_vertex(node.change.get(), node.start.get(), node.end.get());
935 let value = serialize_edge(&edge);
936 let inserted = table.insert(&key, &value)?;
937 Ok(inserted)
938 }
939
940 fn del_graph(
941 &mut self,

Callers 1

test_graph_operationsFunction · 0.45

Calls 4

encode_vertexFunction · 0.85
serialize_edgeFunction · 0.85
getMethod · 0.65
insertMethod · 0.45

Tested by 1

test_graph_operationsFunction · 0.36