MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / delete

Method delete

crates/openshell-server/src/persistence/postgres.rs:326–334  ·  view source on GitHub ↗
(&self, object_type: &str, id: &str)

Source from the content-addressed store, hash-verified

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")

Callers

nothing calls this directly

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected