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

Method delete_if

crates/openshell-server/src/persistence/mod.rs:255–262  ·  view source on GitHub ↗

Delete an object by id with compare-and-swap support. # Arguments `object_type` - Type discriminator for the object `id` - Stable object identifier `expected_resource_version` - Required resource version for the delete to proceed # Returns `Ok(true)` - Object was deleted `Ok(false)` - Object not found `Err(Conflict)` - Resource version mismatch

(
        &self,
        object_type: &str,
        id: &str,
        expected_resource_version: u64,
    )

Source from the content-addressed store, hash-verified

253 /// * `Ok(false)` - Object not found
254 /// * `Err(Conflict)` - Resource version mismatch
255 pub async fn delete_if(
256 &self,
257 object_type: &str,
258 id: &str,
259 expected_resource_version: u64,
260 ) -> PersistenceResult<bool> {
261 store_dispatch!(self.delete_if(object_type, id, expected_resource_version))
262 }
263
264 /// Insert or update a generic named object with an application-owned scope.
265 pub async fn put_scoped(

Calls

no outgoing calls