(&self, sql: &str)
| 289 | #[instrument(level = "trace")] |
| 290 | #[allow(unused_variables)] |
| 291 | async fn execute_unprepared(&self, sql: &str) -> Result<ExecResult, DbErr> { |
| 292 | debug_print!("{}", sql); |
| 293 | |
| 294 | match &mut *self.conn.lock().await { |
| 295 | #[cfg(feature = "sqlx-mysql")] |
| 296 | InnerConnection::MySql(conn) => { |
| 297 | let conn: &mut sqlx::MySqlConnection = &mut *conn; |
| 298 | sqlx::Executor::execute(conn, sql) |
| 299 | .await |
| 300 | .map(Into::into) |
| 301 | .map_err(sqlx_error_to_exec_err) |
| 302 | } |
| 303 | #[cfg(feature = "sqlx-postgres")] |
| 304 | InnerConnection::Postgres(conn) => { |
| 305 | let conn: &mut sqlx::PgConnection = &mut *conn; |
| 306 | sqlx::Executor::execute(conn, sql) |
| 307 | .await |
| 308 | .map(Into::into) |
| 309 | .map_err(sqlx_error_to_exec_err) |
| 310 | } |
| 311 | #[cfg(feature = "sqlx-sqlite")] |
| 312 | InnerConnection::Sqlite(conn) => { |
| 313 | let conn: &mut sqlx::SqliteConnection = &mut *conn; |
| 314 | sqlx::Executor::execute(conn, sql) |
| 315 | .await |
| 316 | .map(Into::into) |
| 317 | .map_err(sqlx_error_to_exec_err) |
| 318 | } |
| 319 | #[cfg(feature = "mock")] |
| 320 | InnerConnection::Mock(conn) => { |
| 321 | let db_backend = conn.get_database_backend(); |
| 322 | let stmt = Statement::from_string(db_backend, sql); |
| 323 | conn.execute(stmt) |
| 324 | } |
| 325 | #[cfg(feature = "proxy")] |
| 326 | InnerConnection::Proxy(conn) => { |
| 327 | let db_backend = conn.get_database_backend(); |
| 328 | let stmt = Statement::from_string(db_backend, sql); |
| 329 | conn.execute(stmt).await |
| 330 | } |
| 331 | #[allow(unreachable_patterns)] |
| 332 | _ => Err(conn_err("Disconnected")), |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | #[instrument(level = "trace")] |
| 337 | #[allow(unused_variables)] |
nothing calls this directly
no test coverage detected