(&self, object_type: &str, id: &str)
| 324 | } |
| 325 | |
| 326 | pub async fn delete(&self, object_type: &str, id: &str) -> PersistenceResult<bool> { |
| 327 | let result = sqlx::query("DELETE FROM objects WHERE object_type = $1 AND id = $2") |
| 328 | .bind(object_type) |
| 329 | .bind(id) |
| 330 | .execute(&self.pool) |
| 331 | .await |
| 332 | .map_err(|e| map_db_error(&e))?; |
| 333 | Ok(result.rows_affected() > 0) |
| 334 | } |
| 335 | |
| 336 | pub async fn delete_by_name(&self, object_type: &str, name: &str) -> PersistenceResult<bool> { |
| 337 | let result = sqlx::query("DELETE FROM objects WHERE object_type = $1 AND name = $2") |
nothing calls this directly
no test coverage detected