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

Method put_graph

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

Source from the content-addressed store, hash-verified

831 }
832
833 fn put_graph(
834 &mut self,
835 node: GraphNode<NodeId>,
836 edge: SerializedGraphEdge,
837 ) -> PristineResult<bool> {
838 let mut table = self.txn.open_multimap_table(GRAPH)?;
839 let key = encode_vertex(node.change.get(), node.start.get(), node.end.get());
840 let value = serialize_edge(&edge);
841 let inserted = table.insert(&key, &value)?;
842 Ok(inserted)
843 }
844
845 fn del_graph(
846 &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