Start a transaction with session context
(
&self,
session_id: Option<String>,
isolation_level: Option<crate::txn::IsolationLevel>,
access_mode: Option<crate::txn::state::AccessMode>,
)
| 595 | |
| 596 | /// Start a transaction with session context |
| 597 | pub fn start_transaction_with_session( |
| 598 | &self, |
| 599 | session_id: Option<String>, |
| 600 | isolation_level: Option<crate::txn::IsolationLevel>, |
| 601 | access_mode: Option<crate::txn::state::AccessMode>, |
| 602 | ) -> Result<TransactionId, ExecutionError> { |
| 603 | let txn_id = self.transaction_manager.start_transaction_with_session( |
| 604 | isolation_level, |
| 605 | access_mode, |
| 606 | session_id, |
| 607 | )?; |
| 608 | |
| 609 | // Update current transaction |
| 610 | let mut current_txn = self.current_transaction.write().map_err(|_| { |
| 611 | ExecutionError::RuntimeError("Failed to write current transaction".to_string()) |
| 612 | })?; |
| 613 | *current_txn = Some(txn_id); |
| 614 | |
| 615 | Ok(txn_id) |
| 616 | } |
| 617 | |
| 618 | /// Get current graph for a transaction based on its session |
| 619 | pub fn get_transaction_current_graph( |
nothing calls this directly
no outgoing calls
no test coverage detected