pub struct TransactionOptions {
pub timeout: Option<Duration>,
pub deadline: Option<Instant>,
pub max_workspace_bytes: Option<usize>,
pub max_records: Option<usize>,
pub max_query_memory_bytes: Option<usize>,
pub spill_threshold_bytes: Option<usize>,
pub max_spill_bytes: Option<u64>,
pub max_journal_bytes: Option<u64>,
pub cancellation_token: Option<CancellationToken>,
pub read_only: bool,
}Expand description
Limits and cancellation controls applied to an explicit transaction.
Fields§
§timeout: Option<Duration>Maximum duration measured from the start of the transaction.
deadline: Option<Instant>Absolute deadline. When both deadline and timeout are set, the earlier instant wins.
max_workspace_bytes: Option<usize>Maximum estimated bytes retained by the writable base snapshot, staged record images, and savepoints.
max_records: Option<usize>Maximum number of staged records retained by the transaction and its savepoints.
max_query_memory_bytes: Option<usize>Maximum estimated heap bytes materialized by a single query. This is independent from the writable transaction workspace limit.
spill_threshold_bytes: Option<usize>Spill staged record images to a private temporary file when their estimated in-memory payload exceeds this threshold.
max_spill_bytes: Option<u64>Maximum size of the append-only temporary spill file.
max_journal_bytes: Option<u64>Maximum encoded commit-journal size, including the durable marker. This can only tighten the internal 1 GiB recovery limit.
cancellation_token: Option<CancellationToken>Optional token that may be cancelled from another thread.
read_only: boolReject statements and procedures which may write data.