MCPcopy Create free account
hub / github.com/cowprotocol/services / fetch

Function fetch

crates/database/src/app_data.rs:36–49  ·  view source on GitHub ↗
(
    ex: &mut PgConnection,
    contract_app_data: &AppId,
)

Source from the content-addressed store, hash-verified

34}
35
36pub async fn fetch(
37 ex: &mut PgConnection,
38 contract_app_data: &AppId,
39) -> Result<Option<Vec<u8>>, sqlx::Error> {
40 const QUERY: &str = r#"
41SELECT full_app_data
42FROM app_data
43WHERE contract_app_data = $1
44;"#;
45 sqlx::query_scalar(QUERY)
46 .bind(contract_app_data)
47 .fetch_optional(ex)
48 .await
49}
50
51#[cfg(test)]
52mod tests {

Callers 1

postgres_app_dataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected