StandardTransaction

Enum StandardTransaction 

Source
pub enum StandardTransaction<'a> {
    Command(&'a mut StandardCommandTransaction),
    Query(&'a mut StandardQueryTransaction),
}
Expand description

An enum that can hold either a command or query transaction for flexible execution

Variants§

Implementations§

Source§

impl<'a> StandardTransaction<'a>

Source

pub fn command(self) -> &'a mut StandardCommandTransaction

Extract the underlying StandardCommandTransaction, panics if this is a Query transaction

Source

pub fn query(self) -> &'a mut StandardQueryTransaction

Extract the underlying StandardQueryTransaction, panics if this is a Command transaction

Source

pub fn command_mut(&mut self) -> &mut StandardCommandTransaction

Get a mutable reference to the underlying StandardCommandTransaction, panics if this is a Query transaction

Source

pub fn query_mut(&mut self) -> &mut StandardQueryTransaction

Get a mutable reference to the underlying StandardQueryTransaction, panics if this is a Command transaction

Source

pub fn catalog(&self) -> &MaterializedCatalog

Source

pub fn version(&self) -> CommitVersion

Trait Implementations§

Source§

impl<'a> From<&'a mut StandardCommandTransaction> for StandardTransaction<'a>

Source§

fn from(txn: &'a mut StandardCommandTransaction) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut StandardQueryTransaction> for StandardTransaction<'a>

Source§

fn from(txn: &'a mut StandardQueryTransaction) -> Self

Converts to this type from the input type.
Source§

impl<'a> MultiVersionQueryTransaction for StandardTransaction<'a>

Source§

fn version(&self) -> CommitVersion

Source§

fn id(&self) -> TransactionId

Source§

fn get(&mut self, key: &EncodedKey) -> Result<Option<MultiVersionValues>>

Source§

fn contains_key(&mut self, key: &EncodedKey) -> Result<bool>

Source§

fn range_batched( &mut self, range: EncodedKeyRange, batch_size: u64, ) -> Result<BoxedMultiVersionIter<'_>>

Source§

fn range_rev_batched( &mut self, range: EncodedKeyRange, batch_size: u64, ) -> Result<BoxedMultiVersionIter<'_>>

Source§

fn prefix(&mut self, prefix: &EncodedKey) -> Result<BoxedMultiVersionIter<'_>>

Source§

fn prefix_rev( &mut self, prefix: &EncodedKey, ) -> Result<BoxedMultiVersionIter<'_>>

Source§

fn read_as_of_version_exclusive(&mut self, version: CommitVersion) -> Result<()>

Source§

fn range( &mut self, range: EncodedKeyRange, ) -> Result<Box<dyn Iterator<Item = MultiVersionValues> + Send + '_>, Error>

Source§

fn range_rev( &mut self, range: EncodedKeyRange, ) -> Result<Box<dyn Iterator<Item = MultiVersionValues> + Send + '_>, Error>

Source§

fn read_as_of_version_inclusive( &mut self, version: CommitVersion, ) -> Result<(), Error>

Source§

impl<'a> QueryTransaction for StandardTransaction<'a>

Source§

type SingleVersionQuery<'b> = <TransactionSingleVersion as SingleVersionTransaction>::Query<'b> where Self: 'b

Source§

type CdcQuery<'b> = <TransactionCdc as CdcTransaction>::Query<'b> where Self: 'b

Source§

fn begin_single_query<'k, I>( &self, keys: I, ) -> Result<Self::SingleVersionQuery<'_>>
where I: IntoIterator<Item = &'k EncodedKey>,

Source§

fn begin_cdc_query(&self) -> Result<Self::CdcQuery<'_>>

Source§

fn with_single_query<'a, I, F, R>(&self, keys: I, f: F) -> Result<R, Error>
where I: IntoIterator<Item = &'a EncodedKey>, F: FnOnce(&mut Self::SingleVersionQuery<'_>) -> Result<R, Error>,

Source§

fn with_cdc_query<F, R>(&self, f: F) -> Result<R, Error>
where F: FnOnce(&mut Self::CdcQuery<'_>) -> Result<R, Error>,

Auto Trait Implementations§

§

impl<'a> Freeze for StandardTransaction<'a>

§

impl<'a> !RefUnwindSafe for StandardTransaction<'a>

§

impl<'a> !Send for StandardTransaction<'a>

§

impl<'a> !Sync for StandardTransaction<'a>

§

impl<'a> Unpin for StandardTransaction<'a>

§

impl<'a> !UnwindSafe for StandardTransaction<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

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

§

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more