(&self, message_id: &str)
| 928 | } |
| 929 | |
| 930 | pub async fn delete_for_message(&self, message_id: &str) -> Result<(), DatabaseError> { |
| 931 | sqlx::query("DELETE FROM parts WHERE message_id = ?") |
| 932 | .bind(message_id) |
| 933 | .execute(&self.pool) |
| 934 | .await |
| 935 | .map_err(|e| DatabaseError::QueryError(e.to_string()))?; |
| 936 | |
| 937 | Ok(()) |
| 938 | } |
| 939 | |
| 940 | pub async fn delete_for_session(&self, session_id: &str) -> Result<(), DatabaseError> { |
| 941 | sqlx::query("DELETE FROM parts WHERE session_id = ?") |