Create a new transaction with session context
(
isolation_level: TxnIsolationLevel,
access_mode: AccessMode,
session_id: String,
)
| 163 | |
| 164 | /// Create a new transaction with session context |
| 165 | pub fn new_with_session( |
| 166 | isolation_level: TxnIsolationLevel, |
| 167 | access_mode: AccessMode, |
| 168 | session_id: String, |
| 169 | ) -> Self { |
| 170 | Self { |
| 171 | id: TransactionId::new(), |
| 172 | session_id: Some(session_id), |
| 173 | status: TransactionStatus::Active, |
| 174 | isolation_level, |
| 175 | access_mode, |
| 176 | start_time: SystemTime::now(), |
| 177 | end_time: None, |
| 178 | operations: Vec::new(), |
| 179 | sequence_number: 0, |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | /// Add an operation to this transaction |
| 184 | pub fn add_operation(&mut self, operation_type: OperationType, description: String) { |
nothing calls this directly
no outgoing calls
no test coverage detected