The writable redb handle, for stores that keep their tables in the same repository database. `None` for a read-only pristine. A second `Database` for the same file cannot be opened while this one is alive, even in the same process, so co-located stores must share it.
(&self)
| 689 | /// A second `Database` for the same file cannot be opened while this one |
| 690 | /// is alive, even in the same process, so co-located stores must share it. |
| 691 | pub fn shared_database(&self) -> Option<Arc<Database>> { |
| 692 | match &self.db { |
| 693 | PristineDatabase::Writable(db, _) => Some(Arc::clone(db)), |
| 694 | PristineDatabase::ReadOnly(_) => None, |
| 695 | } |
| 696 | } |
| 697 | |
| 698 | /// Begin a read-only transaction |
| 699 | /// |