(&self, object_type: &str, name: &str)
| 355 | } |
| 356 | |
| 357 | pub async fn delete_by_name(&self, object_type: &str, name: &str) -> PersistenceResult<bool> { |
| 358 | let result = sqlx::query( |
| 359 | r#" |
| 360 | DELETE FROM "objects" |
| 361 | WHERE "object_type" = ?1 AND "name" = ?2 |
| 362 | "#, |
| 363 | ) |
| 364 | .bind(object_type) |
| 365 | .bind(name) |
| 366 | .execute(&self.pool) |
| 367 | .await |
| 368 | .map_err(|e| map_db_error(&e))?; |
| 369 | Ok(result.rows_affected() > 0) |
| 370 | } |
| 371 | |
| 372 | pub async fn list( |
| 373 | &self, |
nothing calls this directly
no test coverage detected