(&self, id: &str)
| 663 | } |
| 664 | |
| 665 | pub async fn get_draft_chunk(&self, id: &str) -> PersistenceResult<Option<DraftChunkRecord>> { |
| 666 | let row = sqlx::query( |
| 667 | r" |
| 668 | SELECT id, scope, status, hit_count, payload, created_at_ms, updated_at_ms |
| 669 | FROM objects |
| 670 | WHERE 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, |
no test coverage detected