Internal rollback implementation
(&mut self)
| 223 | |
| 224 | /// Internal rollback implementation |
| 225 | fn rollback_internal(&mut self) -> Result<()> { |
| 226 | if self.committed { |
| 227 | return Ok(()); // Already committed, nothing to rollback |
| 228 | } |
| 229 | |
| 230 | self.session |
| 231 | .coordinator() |
| 232 | .process_query("ROLLBACK", self.session.id()) |
| 233 | .map_err(|e| Error::Transaction(format!("Failed to rollback: {}", e)))?; |
| 234 | |
| 235 | self.committed = true; // Mark as finished |
| 236 | Ok(()) |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | impl<'conn> Drop for Transaction<'conn> { |
no test coverage detected