MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / read_journal_mode

Function read_journal_mode

src/runtime_telemetry.rs:248–273  ·  view source on GitHub ↗
(cg: &crate::tracedecay::TraceDecay)

Source from the content-addressed store, hash-verified

246}
247
248async fn read_journal_mode(cg: &crate::tracedecay::TraceDecay) -> Result<String> {
249 let mut rows = cg
250 .db()
251 .conn()
252 .query("PRAGMA journal_mode", ())
253 .await
254 .map_err(|e| TraceDecayError::Database {
255 message: format!("failed to read journal_mode: {e}"),
256 operation: "read_journal_mode".to_string(),
257 })?;
258 let row = rows
259 .next()
260 .await
261 .map_err(|e| TraceDecayError::Database {
262 message: format!("failed to read journal_mode row: {e}"),
263 operation: "read_journal_mode".to_string(),
264 })?
265 .ok_or_else(|| TraceDecayError::Database {
266 message: "no journal_mode row returned".to_string(),
267 operation: "read_journal_mode".to_string(),
268 })?;
269 row.get::<String>(0).map_err(|e| TraceDecayError::Database {
270 message: format!("failed to decode journal_mode: {e}"),
271 operation: "read_journal_mode".to_string(),
272 })
273}
274
275async fn read_source_total_bytes(cg: &crate::tracedecay::TraceDecay) -> Result<u64> {
276 let mut rows = cg

Callers 1

sample_databaseFunction · 0.85

Calls 2

connMethod · 0.45
dbMethod · 0.45

Tested by

no test coverage detected