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

Method delete_draft_chunks

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

Source from the content-addressed store, hash-verified

789 }
790
791 pub async fn delete_draft_chunks(
792 &self,
793 sandbox_id: &str,
794 status: &str,
795 ) -> PersistenceResult<u64> {
796 let result = sqlx::query(
797 r"
798DELETE FROM objects
799WHERE object_type = $1 AND scope = $2 AND status = $3
800",
801 )
802 .bind(DRAFT_CHUNK_OBJECT_TYPE)
803 .bind(sandbox_id)
804 .bind(status)
805 .execute(&self.pool)
806 .await
807 .map_err(|e| map_db_error(&e))?;
808 Ok(result.rows_affected())
809 }
810
811 pub async fn get_draft_version(&self, sandbox_id: &str) -> PersistenceResult<i64> {
812 let rows = sqlx::query(

Callers

nothing calls this directly

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected