Mark completion after all graph, attribute and FileOps writes. The transaction must commit those effects together with this marker.
(&mut self, id: NodeId)
| 130 | /// Mark completion after all graph, attribute and FileOps writes. The |
| 131 | /// transaction must commit those effects together with this marker. |
| 132 | pub fn mark_change_applied(&mut self, id: NodeId) -> PristineResult<()> { |
| 133 | if id.is_root() || self.get_external(id)?.is_none() { |
| 134 | return Err(super::error::PristineError::ChangeNotFound { id: id.get() }); |
| 135 | } |
| 136 | self.txn.open_table(APPLIED_CHANGES)?.insert(id.get(), 1)?; |
| 137 | Ok(()) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | #[cfg(test)] |