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

Method new

graphlite/src/session/transaction_state.rs:36–44  ·  view source on GitHub ↗

Create a new session transaction state

(manager: Arc<TransactionManager>)

Source from the content-addressed store, hash-verified

34impl SessionTransactionState {
35 /// Create a new session transaction state
36 pub fn new(manager: Arc<TransactionManager>) -> Self {
37 Self {
38 manager,
39 current_transaction: Arc::new(RwLock::new(None)),
40 transaction_logs: Arc::new(RwLock::new(HashMap::new())),
41 auto_commit: Arc::new(RwLock::new(true)),
42 isolation_level: Arc::new(RwLock::new(IsolationLevel::ReadCommitted)),
43 }
44 }
45
46 /// Get the transaction manager
47 pub fn manager(&self) -> Arc<TransactionManager> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected