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

Method delete_by_name

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

Source from the content-addressed store, hash-verified

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")
338 .bind(object_type)
339 .bind(name)
340 .execute(&self.pool)
341 .await
342 .map_err(|e| map_db_error(&e))?;
343 Ok(result.rows_affected() > 0)
344 }
345
346 pub async fn list(
347 &self,

Callers

nothing calls this directly

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected