Begin a read-write transaction Only one write transaction can be active at a time. The transaction must be explicitly committed with `commit()` or it will be rolled back when dropped.
(&self)
| 287 | /// must be explicitly committed with `commit()` or it will be rolled back |
| 288 | /// when dropped. |
| 289 | pub fn write_txn(&self) -> PristineResult<WriteTxn<'_>> { |
| 290 | let mut txn = self.db.begin_write()?; |
| 291 | txn.set_durability(redb::Durability::Eventual); |
| 292 | Ok(WriteTxn::new( |
| 293 | txn, |
| 294 | &self.next_node_id, |
| 295 | &self.next_view_id, |
| 296 | &self.next_inode, |
| 297 | )) |
| 298 | } |
| 299 | |
| 300 | /// Allocate a new node ID |
| 301 | /// |
no outgoing calls