(&self, sql: &str)
| 157 | /// Execute an unprepared SQL statement on a PostgreSQL backend |
| 158 | #[instrument(level = "trace")] |
| 159 | pub async fn execute_unprepared(&self, sql: &str) -> Result<ExecResult, DbErr> { |
| 160 | debug_print!("{}", sql); |
| 161 | |
| 162 | let conn = &mut self.pool.acquire().await.map_err(sqlx_conn_acquire_err)?; |
| 163 | match conn.execute(sql).await { |
| 164 | Ok(res) => Ok(res.into()), |
| 165 | Err(err) => Err(sqlx_error_to_exec_err(err)), |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /// Get one result from a SQL query. Returns [Option::None] if no match was found |
| 170 | #[instrument(level = "trace")] |
nothing calls this directly
no test coverage detected