Trait tikv::storage::txn::commands::prewrite::PrewriteKind[][src]

trait PrewriteKind {
    type Mutation: MutationLock;
    fn txn_kind(&self) -> TransactionKind;

    fn can_skip_constraint_check(
        &mut self,
        _mutations: &mut [Self::Mutation],
        _snapshot: &impl Snapshot,
        _context: &mut WriteContext<'_, impl LockManager>
    ) -> Result<()> { ... } }

Encapsulates things which must be done differently for optimistic or pessimistic transactions.

Associated Types

type Mutation: MutationLock[src]

The type of mutation and, optionally, its extra information, differing for the optimistic and pessimistic transaction.

Loading content...

Required methods

fn txn_kind(&self) -> TransactionKind[src]

Loading content...

Provided methods

fn can_skip_constraint_check(
    &mut self,
    _mutations: &mut [Self::Mutation],
    _snapshot: &impl Snapshot,
    _context: &mut WriteContext<'_, impl LockManager>
) -> Result<()>
[src]

Loading content...

Implementors

impl PrewriteKind for Optimistic[src]

type Mutation = Mutation

impl PrewriteKind for Pessimistic[src]

Loading content...