linkrs_query/executor/streaming/operators/spec/txn.rs
1//! Immutable configuration for transaction operators.
2
3/// Immutable config for transaction operators.
4///
5/// The actual transaction state transitions are performed by the
6/// [`SessionTransactionController`] at execution time.
7#[derive(Debug, Clone)]
8pub enum TxnSpec {
9 BeginTransaction,
10 Commit,
11 Rollback,
12 /// Roll back to a savepoint: validates the controller is in `Active`
13 /// state but does NOT transition out of it.
14 RollbackToSavepoint {
15 name: String,
16 },
17 /// Create a savepoint (validation only — the TransactionManager
18 /// operation is performed by the API layer beforehand).
19 Savepoint {
20 name: String,
21 },
22 /// Release a savepoint (validation only — the TransactionManager
23 /// operation is performed by the API layer beforehand).
24 ReleaseSavepoint {
25 name: String,
26 },
27}