MCPcopy Create free account
hub / github.com/emwalker/digraph / load

Method load

backend/src/psql/organization.rs:54–73  ·  view source on GitHub ↗
(&self, ids: &[String])

Source from the content-addressed store, hash-verified

52 type Error = Error;
53
54 async fn load(&self, ids: &[String]) -> Result<HashMap<String, Self::Value>> {
55 log::debug!("batch load organizations: {:?}", ids);
56
57 let rows = sqlx::query_as::<_, Row>(
58 "select
59 o.id,
60 o.name,
61 o.login
62
63 from organizations o
64 where o.id = any($1::uuid[]) and (o.owner_id = $2::uuid or o.public)",
65 )
66 .bind(ids)
67 .bind(&self.viewer.user_id)
68 .fetch_all(&self.pool)
69 .await
70 .map_err(Error::from)?;
71
72 try_convert(rows)
73 }
74}

Callers

nothing calls this directly

Calls 2

try_convertFunction · 0.85
fetch_allMethod · 0.80

Tested by

no test coverage detected