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

Method get_draft_chunk

crates/openshell-server/src/persistence/postgres.rs:665–680  ·  view source on GitHub ↗
(&self, id: &str)

Source from the content-addressed store, hash-verified

663 }
664
665 pub async fn get_draft_chunk(&self, id: &str) -> PersistenceResult<Option<DraftChunkRecord>> {
666 let row = sqlx::query(
667 r"
668SELECT id, scope, status, hit_count, payload, created_at_ms, updated_at_ms
669FROM objects
670WHERE object_type = $1 AND id = $2
671",
672 )
673 .bind(DRAFT_CHUNK_OBJECT_TYPE)
674 .bind(id)
675 .fetch_optional(&self.pool)
676 .await
677 .map_err(|e| map_db_error(&e))?;
678
679 row.map(row_to_draft_chunk_record).transpose()
680 }
681
682 pub async fn list_draft_chunks(
683 &self,

Callers 2

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected