MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / new_with_session

Method new_with_session

graphlite/src/txn/state.rs:165–181  ·  view source on GitHub ↗

Create a new transaction with session context

(
        isolation_level: TxnIsolationLevel,
        access_mode: AccessMode,
        session_id: String,
    )

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected