(&self, id: &str)
| 685 | } |
| 686 | |
| 687 | pub async fn get_draft_chunk(&self, id: &str) -> PersistenceResult<Option<DraftChunkRecord>> { |
| 688 | let row = sqlx::query( |
| 689 | r#" |
| 690 | SELECT "id", "scope", "status", "hit_count", "payload", "created_at_ms", "updated_at_ms" |
| 691 | FROM "objects" |
| 692 | WHERE "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, |
no test coverage detected