(&self, sql: &str)
| 58 | } |
| 59 | |
| 60 | query.execute(&self.pool).await?; |
| 61 | Ok(()) |
| 62 | } |
| 63 | |
| 64 | |
| 65 | async fn execute(&self, sql: &str) -> Result<(), DbError> { |
| 66 | for single_sql in sql.split(";") { |
| 67 | if !single_sql.trim().is_empty() { |
| 68 | sqlx::query(single_sql).execute(&self.pool).await?; |
| 69 | } |
| 70 | } |
| 71 | Ok(()) |
| 72 | } |
| 73 | |
| 74 | async fn fetch_strings(&self, sql: &str) -> Result<Vec<String>, DbError> { |
| 75 | let rows = sqlx::query(sql).fetch_all(&self.pool).await?; |
| 76 |
no test coverage detected