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

Method delete

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

Source from the content-addressed store, hash-verified

340 }
341
342 pub async fn delete(&self, object_type: &str, id: &str) -> PersistenceResult<bool> {
343 let result = sqlx::query(
344 r#"
345DELETE FROM "objects"
346WHERE "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(

Callers

nothing calls this directly

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected