add rocksdb secondary; fix read_only mode.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-01 04:20:31 +00:00 committed by strawberry
parent 6b80361c31
commit 96fcf7f94d
5 changed files with 27 additions and 2 deletions

View file

@ -38,6 +38,14 @@ impl Database {
#[inline]
pub fn iter_maps(&self) -> impl Iterator<Item = (&MapsKey, &MapsVal)> + Send + '_ { self.map.iter() }
#[inline]
#[must_use]
pub fn is_read_only(&self) -> bool { self.db.secondary || self.db.read_only }
#[inline]
#[must_use]
pub fn is_secondary(&self) -> bool { self.db.secondary }
}
impl Index<&str> for Database {