Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: Introduce `Profile::database_mut`
✗ CI failure Lorenz Leutgeb committed 2 months ago
commit ee64f69ef9a80db2964bdb8018c9b47086f9a454
parent c32af34ad96b533c5b1e9e5afec0adc9ac95e705
2 failed (2 total) View logs
1 file changed +9 -0
modified crates/radicle/src/profile.rs
@@ -419,6 +419,15 @@ impl Profile {
            Err(e) => Err(e.into()),
        }
    }
+

+
    /// Return a handle to the database of the node, with SQLite configuration
+
    /// from [`Self::config`] applied.
+
    pub fn database_mut(&self) -> Result<node::Database, node::db::Error> {
+
        self.home
+
            .database_mut()?
+
            .journal_mode(self.config.node.database.sqlite.pragma.journal_mode)?
+
            .synchronous(self.config.node.database.sqlite.pragma.synchronous)
+
    }
}

impl std::ops::Deref for Profile {