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

Method put_graph

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

Source from the content-addressed store, hash-verified

358 }
359
360 fn put_graph(
361 &mut self,
362 node: GraphNode<NodeId>,
363 edge: SerializedGraphEdge,
364 ) -> PristineResult<bool> {
365 let mut table = self.txn.open_multimap_table(GRAPH)?;
366 let key = encode_vertex(node.change.get(), node.start.get(), node.end.get());
367 let value = serialize_edge(&edge);
368 let inserted = table.insert(&key, &value)?;
369 Ok(inserted)
370 }
371
372 fn del_graph(
373 &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