Internal commit implementation
(&mut self)
| 206 | |
| 207 | /// Internal commit implementation |
| 208 | fn commit_internal(&mut self) -> Result<()> { |
| 209 | if self.committed { |
| 210 | return Err(Error::Transaction( |
| 211 | "Transaction already committed".to_string(), |
| 212 | )); |
| 213 | } |
| 214 | |
| 215 | self.session |
| 216 | .coordinator() |
| 217 | .process_query("COMMIT", self.session.id()) |
| 218 | .map_err(|e| Error::Transaction(format!("Failed to commit: {}", e)))?; |
| 219 | |
| 220 | self.committed = true; |
| 221 | Ok(()) |
| 222 | } |
| 223 | |
| 224 | /// Internal rollback implementation |
| 225 | fn rollback_internal(&mut self) -> Result<()> { |
no test coverage detected