MCPcopy Create free account
hub / github.com/4xmen/rustavel / fetch_strings_params

Method fetch_strings_params

core/src/sql/database_client.rs:90–107  ·  view source on GitHub ↗
(&self, sql: &str, params: &[&str])

Source from the content-addressed store, hash-verified

88 }
89
90 async fn fetch_strings_params(&self, sql: &str, params: &[&str]) -> Result<Vec<String>, DbError> {
91 let mut query = sqlx::query(sql);
92
93 for param in params {
94 query = query.bind(*param);
95 }
96
97 let rows = query.fetch_all(&self.pool).await?;
98
99
100 Ok(rows
101 .into_iter()
102 .map(|row| {
103 // dbg!(&row);
104 row.get::<String, _>(0)
105 })
106 .collect())
107 }
108
109 async fn fetch_count_params(
110 &self,

Callers 1

get_ran_migrations_gtMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected