MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / in_memory

Method in_memory

crates/opencode-storage/src/database.rs:55–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54
55 pub async fn in_memory() -> Result<Self, DatabaseError> {
56 let pool = SqlitePoolOptions::new()
57 .max_connections(1)
58 .connect("sqlite::memory:")
59 .await
60 .map_err(|e| DatabaseError::ConnectionError(e.to_string()))?;
61
62 let db = Self { pool };
63 db.run_migrations().await?;
64
65 Ok(db)
66 }
67
68 pub fn pool(&self) -> &SqlitePool {
69 &self.pool

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
run_migrationsMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected