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

Method delete_draft_chunks

crates/openshell-server/src/persistence/sqlite.rs:813–831  ·  view source on GitHub ↗
(
        &self,
        sandbox_id: &str,
        status: &str,
    )

Source from the content-addressed store, hash-verified

811 }
812
813 pub async fn delete_draft_chunks(
814 &self,
815 sandbox_id: &str,
816 status: &str,
817 ) -> PersistenceResult<u64> {
818 let result = sqlx::query(
819 r#"
820DELETE FROM "objects"
821WHERE "object_type" = ?1 AND "scope" = ?2 AND "status" = ?3
822"#,
823 )
824 .bind(DRAFT_CHUNK_OBJECT_TYPE)
825 .bind(sandbox_id)
826 .bind(status)
827 .execute(&self.pool)
828 .await
829 .map_err(|e| map_db_error(&e))?;
830 Ok(result.rows_affected())
831 }
832
833 pub async fn get_draft_version(&self, sandbox_id: &str) -> PersistenceResult<i64> {
834 let rows = sqlx::query(

Callers 1

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected