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

Method get_draft_chunk

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

Source from the content-addressed store, hash-verified

685 }
686
687 pub async fn get_draft_chunk(&self, id: &str) -> PersistenceResult<Option<DraftChunkRecord>> {
688 let row = sqlx::query(
689 r#"
690SELECT "id", "scope", "status", "hit_count", "payload", "created_at_ms", "updated_at_ms"
691FROM "objects"
692WHERE "object_type" = ?1 AND "id" = ?2
693"#,
694 )
695 .bind(DRAFT_CHUNK_OBJECT_TYPE)
696 .bind(id)
697 .fetch_optional(&self.pool)
698 .await
699 .map_err(|e| map_db_error(&e))?;
700
701 row.map(row_to_draft_chunk_record).transpose()
702 }
703
704 pub async fn list_draft_chunks(
705 &self,

Calls 1

map_db_errorFunction · 0.85

Tested by

no test coverage detected