Skip to main content

TransactionManager

Struct TransactionManager 

Source
pub struct TransactionManager { /* private fields */ }

Implementations§

Source§

impl TransactionManager

Source

pub fn new() -> Self

Source

pub fn with_lock_manager(lock_manager: Arc<LockManager>) -> Self

Source

pub fn lock_manager_arc(&self) -> Arc<LockManager>

Source

pub fn begin( &self, isolation_level: IsolationLevel, access_mode: TransactionAccessMode, ) -> QuillSQLResult<Transaction>

Source

pub fn acquire_table_lock( &self, txn: &Transaction, table: TableReference, mode: LockMode, ) -> QuillSQLResult<()>

Source

pub fn try_acquire_row_lock( &self, txn: &Transaction, table: TableReference, rid: RecordId, mode: LockMode, ) -> QuillSQLResult<bool>

Source

pub fn acquire_row_lock( &self, txn: &Transaction, table: TableReference, rid: RecordId, mode: LockMode, ) -> QuillSQLResult<()>

Source

pub fn commit(&self, txn: &mut Transaction) -> QuillSQLResult<()>

Source

pub fn abort(&self, txn: &mut Transaction) -> QuillSQLResult<()>

Source

pub fn active_transactions(&self) -> Vec<TransactionId>

Source

pub fn snapshot(&self, txn_id: TransactionId) -> TransactionSnapshot

Source

pub fn transaction_status(&self, txn_id: TransactionId) -> TransactionStatus

Source

pub fn record_recovered_status( &self, txn_id: TransactionId, status: TransactionStatus, )

Source

pub fn ensure_next_txn_id_at_least(&self, next_txn_id: TransactionId)

Source

pub fn oldest_active_txn(&self) -> Option<TransactionId>

Source

pub fn next_txn_id_hint(&self) -> TransactionId

Source

pub fn debug_snapshot(&self) -> TxnDebugSnapshot

Source

pub fn record_row_lock( &self, txn_id: TransactionId, table: TableReference, rid: RecordId, mode: LockMode, )

Source

pub fn unlock_row( &self, txn_id: TransactionId, table: &TableReference, rid: RecordId, )

Trait Implementations§

Source§

impl Default for TransactionManager

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.