Soft-delete every edge incident on `node` (as either src or dst) in the caller's tenant, across all collections. Emits a tombstone version at `system_from` for each distinct base edge that has a live (non-sentinel) latest version.
(
&self,
tid: TenantId,
node: &str,
system_from: i64,
)
| 14 | /// version at `system_from` for each distinct base edge that has a |
| 15 | /// live (non-sentinel) latest version. |
| 16 | pub fn delete_edges_for_node( |
| 17 | &self, |
| 18 | tid: TenantId, |
| 19 | node: &str, |
| 20 | system_from: i64, |
| 21 | ) -> crate::Result<()> { |
| 22 | // Snapshot all live bases touching `node`. Done in a read txn first |
| 23 | // so the write txn can call soft_delete_edge without nested locks. |
| 24 | let bases = self.live_bases_touching_node(tid, node)?; |
| 25 | for (collection, src, label, dst) in &bases { |
| 26 | self.soft_delete_edge(EdgeRef::new(tid, collection, src, label, dst), system_from)?; |
| 27 | } |
| 28 | Ok(()) |
| 29 | } |
| 30 | |
| 31 | /// Enumerate `(collection, src, label, dst)` tuples for every base edge |
| 32 | /// in this tenant whose latest version touches `node` as src or dst and |