(&self, object_type: &str, id: &str)
| 340 | } |
| 341 | |
| 342 | pub async fn delete(&self, object_type: &str, id: &str) -> PersistenceResult<bool> { |
| 343 | let result = sqlx::query( |
| 344 | r#" |
| 345 | DELETE FROM "objects" |
| 346 | WHERE "object_type" = ?1 AND "id" = ?2 |
| 347 | "#, |
| 348 | ) |
| 349 | .bind(object_type) |
| 350 | .bind(id) |
| 351 | .execute(&self.pool) |
| 352 | .await |
| 353 | .map_err(|e| map_db_error(&e))?; |
| 354 | Ok(result.rows_affected() > 0) |
| 355 | } |
| 356 | |
| 357 | pub async fn delete_by_name(&self, object_type: &str, name: &str) -> PersistenceResult<bool> { |
| 358 | let result = sqlx::query( |
nothing calls this directly
no test coverage detected