MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / connect

Method connect

crates/openshell-server/src/persistence/postgres.rs:25–33  ·  view source on GitHub ↗
(url: &str)

Source from the content-addressed store, hash-verified

23
24impl PostgresStore {
25 pub async fn connect(url: &str) -> PersistenceResult<Self> {
26 let pool = PgPoolOptions::new()
27 .max_connections(10)
28 .connect(url)
29 .await
30 .map_err(|e| map_db_error(&e))?;
31
32 Ok(Self { pool })
33 }
34
35 pub async fn migrate(&self) -> PersistenceResult<()> {
36 POSTGRES_MIGRATOR

Callers

nothing calls this directly

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected