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

Method delete_by_name

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

Source from the content-addressed store, hash-verified

355 }
356
357 pub async fn delete_by_name(&self, object_type: &str, name: &str) -> PersistenceResult<bool> {
358 let result = sqlx::query(
359 r#"
360DELETE FROM "objects"
361WHERE "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,

Callers

nothing calls this directly

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected