removed key in new()

main
Niko PLP 9 months ago
parent c2d31daa1c
commit b3ae51da82
  1. 7
      lib/oxigraph/src/storage/backend/oxi_rocksdb.rs
  2. 4
      lib/oxigraph/src/storage/mod.rs
  3. 8
      lib/oxigraph/src/store.rs

@ -155,11 +155,8 @@ impl Drop for RoDbHandler {
}
impl Db {
pub fn new(
column_families: Vec<ColumnFamilyDefinition>,
key: Option<[u8; 32]>,
) -> Result<Self, StorageError> {
Self::open_read_write(None, column_families, key)
pub fn new(column_families: Vec<ColumnFamilyDefinition>) -> Result<Self, StorageError> {
Self::open_read_write(None, column_families, None)
}
pub fn open_read_write(

@ -72,8 +72,8 @@ pub struct Storage {
}
impl Storage {
pub fn new(key: Option<[u8; 32]>) -> Result<Self, StorageError> {
Self::setup(Db::new(Self::column_families(), key)?)
pub fn new() -> Result<Self, StorageError> {
Self::setup(Db::new(Self::column_families())?)
}
#[cfg(all(not(target_family = "wasm")))]

@ -91,13 +91,7 @@ impl Store {
/// Creates a temporary [`Store`] that will be deleted after drop.
pub fn new() -> Result<Self, StorageError> {
Ok(Self {
storage: Storage::new(None)?,
})
}
pub fn new_with_key(key: [u8; 32]) -> Result<Self, StorageError> {
Ok(Self {
storage: Storage::new(Some(key))?,
storage: Storage::new()?,
})
}

Loading…
Cancel
Save