(
&self,
sandbox_id: &str,
status: &str,
)
| 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" |
| 798 | DELETE FROM objects |
| 799 | WHERE 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( |
nothing calls this directly
no test coverage detected