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 be03d66ffa8654a095cf99d98ad4f529885f7e54
parent a55d7dffec01212912f31ff7bf18702a5b5b73d1
1 failed (1 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 {