pub struct Txn<'txn> {
    db: &'txn DB,
    db_state_guard: RwLockReadGuard<'txn, DbState>,
    snap: CachedSnap,
    snap_list_ver: ListVer,
    dependent_itvs_prim: IntervalSet<&'txn PrimaryKey>,
    dependent_itvs_scnds: HashMap<ScndIdxNum, IntervalSet<&'txn SubValue>>,
    staging: Option<StagingUnit>,
}

Fields§

§db: &'txn DB§db_state_guard: RwLockReadGuard<'txn, DbState>§snap: CachedSnap§snap_list_ver: ListVer§dependent_itvs_prim: IntervalSet<&'txn PrimaryKey>§dependent_itvs_scnds: HashMap<ScndIdxNum, IntervalSet<&'txn SubValue>>§staging: Option<StagingUnit>

Implementations§

source§

impl<'txn> Txn<'txn>

source

pub(super) fn has_conflict(&mut self) -> Result<bool>

source§

impl<'txn> Txn<'txn>

source

pub(super) fn notify_fc_worker<const LEN: usize>( &self, updated_mhlv: Option<ListVer>, fc_able_commit_vers: [Option<CommitVer>; LEN] )

source

fn send_updated_min_held_list_ver(&self, updated_mhlv: Option<ListVer>)

source

fn send_fc_able_commit_vers<const LEN: usize>( &self, fc_able_commit_vers: [Option<CommitVer>; LEN] )

source§

impl<'txn> Txn<'txn>

source

pub(super) async fn new( db: &'txn DB, db_state_guard: RwLockReadGuard<'txn, DbState> ) -> Self

source

pub(super) async fn try_commit(self) -> Result<TryCommitResult<'txn>>

source

fn update_snapshot_for_conflict_checking( &mut self, lsm_state: MutexGuard<'_, LsmState> ) -> Result<()>

source

pub(super) async fn reset(&mut self) -> Result<()>

source

pub(super) async fn close(self) -> Result<()>

source

fn do_commit(self, lsm_state: MutexGuard<'_, LsmState>) -> Result<()>

source§

impl<'txn> Txn<'txn>

source

pub fn get_pk_one( &mut self, pk: &'txn PrimaryKey ) -> Result<Option<(PKShared, PVShared)>>

source

pub fn get_pk_range( &mut self, pk_lo: Option<&'txn PrimaryKey>, pk_hi: Option<&'txn PrimaryKey> ) -> impl Iterator<Item = Entry<'_, PKShared, PVShared>>

source

pub fn get_sv_range( &mut self, sv_spec_arg: &SubValueSpec, sv_lo: Option<&'txn SubValue>, sv_hi: Option<&'txn SubValue> ) -> Result<impl Iterator<Item = Entry<'_, SVPKShared, PVShared>>>

source

pub fn put( &mut self, pk: &'txn PKShared, new_pv: &Option<PVShared> ) -> Result<()>

source

fn put_scnd_stg_delta( &mut self, pk: &'txn PKShared, old_pv: &Option<PVShared>, new_pv: &Option<PVShared> ) -> Result<()>

source

fn ensure_create_staging(&mut self) -> Result<()>

source§

impl<'txn> Txn<'txn>

source

pub async fn run<ClientOk>( db: &'txn DB, retry_limit: usize, client_fn: impl FnMut(&mut Self) -> Result<ClientCommitDecision<ClientOk>> ) -> Result<ClientOk>

Auto Trait Implementations§

§

impl<'txn> !RefUnwindSafe for Txn<'txn>

§

impl<'txn> Send for Txn<'txn>

§

impl<'txn> Sync for Txn<'txn>

§

impl<'txn> Unpin for Txn<'txn>

§

impl<'txn> !UnwindSafe for Txn<'txn>

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>,

§

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>,

§

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.
§

impl<T> Erased for T