Write an EdgeUpdate atom to the graph. Modifies existing edges in the graph. This is primarily used for: - Marking content as deleted (adding DELETED flag) - Undeleting content (removing DELETED flag) - Changing edge properties Edges are written to the global GRAPH and INODE_GRAPH tables. # Arguments `txn` - Write transaction for graph modifications `workspace` - Workspace for tracking state a
(
txn: &mut CachedWriteGraphTxn<'_, '_>,
workspace: &mut Workspace,
change_id: NodeId,
edge_update: &EdgeUpdate<Option<Hash>>,
change: &Change,
detect_conflicts: bool,
)
| 78 | /// - `BlockNotFound`: Source or target span doesn't exist |
| 79 | /// - `Internal`: Database error |
| 80 | pub fn write_edge_map( |
| 81 | txn: &mut CachedWriteGraphTxn<'_, '_>, |
| 82 | workspace: &mut Workspace, |
| 83 | change_id: NodeId, |
| 84 | edge_update: &EdgeUpdate<Option<Hash>>, |
| 85 | change: &Change, |
| 86 | detect_conflicts: bool, |
| 87 | ) -> Result<(), LocalApplyError> { |
| 88 | // Process each edge in the map |
| 89 | for edge in &edge_update.edges { |
| 90 | write_new_edge( |
| 91 | txn, |
| 92 | workspace, |
| 93 | change_id, |
| 94 | &edge_update.inode, |
| 95 | edge, |
| 96 | change, |
| 97 | detect_conflicts, |
| 98 | )?; |
| 99 | } |
| 100 | |
| 101 | Ok(()) |
| 102 | } |
| 103 | |
| 104 | // --------------------------------------------------------------------------- |
| 105 | // Vertex resolution helpers for the apply pipeline |
no test coverage detected