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

Method put_graph

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

Source from the content-addressed store, hash-verified

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