return current journal_mode in dc_get_info()

values are either 'delete' or 'wal';
having this info in debug reports is useful for debugging anyway,
if we switch to WAL or not.
This commit is contained in:
B. Petersen
2020-05-16 14:15:15 +02:00
committed by holger krekel
parent 9e0506cb48
commit b864911e18

View File

@@ -240,7 +240,10 @@ impl Context {
.sql
.get_raw_config_int(self, "dbversion")
.unwrap_or_default();
let journal_mode = self
.sql
.query_get_value(self, "PRAGMA journal_mode;", rusqlite::NO_PARAMS)
.unwrap_or("unknown".to_string());
let e2ee_enabled = self.get_config_int(Config::E2eeEnabled);
let mdns_enabled = self.get_config_int(Config::MdnsEnabled);
let bcc_self = self.get_config_int(Config::BccSelf);
@@ -285,6 +288,7 @@ impl Context {
res.insert("number_of_contacts", contacts.to_string());
res.insert("database_dir", self.get_dbfile().display().to_string());
res.insert("database_version", dbversion.to_string());
res.insert("journal_mode", journal_mode);
res.insert("blobdir", self.get_blobdir().display().to_string());
res.insert("display_name", displayname.unwrap_or_else(|| unset.into()));
res.insert(