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 version(&self) -> CommitVersion

Get the transaction version

Source

pub fn id(&self) -> TransactionId

Get the transaction ID

Source

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

Get a value by key (async method)

Source

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

Check if a key exists (async method)

Source

pub async fn range_batch( &mut self, range: EncodedKeyRange, batch_size: u64, ) -> Result<MultiVersionBatch>

Get a range batch (async method)

Source

pub async fn range_rev_batch( &mut self, range: EncodedKeyRange, batch_size: u64, ) -> Result<MultiVersionBatch>

Get a reverse range batch (async method)

Source

pub async fn prefix(&mut self, prefix: &EncodedKey) -> Result<MultiVersionBatch>

Get a prefix batch (async method)

Source

pub async fn prefix_rev( &mut self, prefix: &EncodedKey, ) -> Result<MultiVersionBatch>

Get a reverse prefix batch (async method)

Source

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

Read as of version exclusive (async method)

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

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<'life0, 'life1, 'async_trait>( &'life0 mut self, key: &'life1 EncodedKey, ) -> Pin<Box<dyn Future<Output = Result<Option<MultiVersionValues>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn contains_key<'life0, 'life1, 'async_trait>( &'life0 mut self, key: &'life1 EncodedKey, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn range_batch<'life0, 'async_trait>( &'life0 mut self, range: EncodedKeyRange, batch_size: u64, ) -> Pin<Box<dyn Future<Output = Result<MultiVersionBatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn range_rev_batch<'life0, 'async_trait>( &'life0 mut self, range: EncodedKeyRange, batch_size: u64, ) -> Pin<Box<dyn Future<Output = Result<MultiVersionBatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn read_as_of_version_exclusive<'life0, 'async_trait>( &'life0 mut self, version: CommitVersion, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn range<'life0, 'async_trait>( &'life0 mut self, range: EncodedKeyRange, ) -> Pin<Box<dyn Future<Output = Result<MultiVersionBatch, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source§

fn range_rev<'life0, 'async_trait>( &'life0 mut self, range: EncodedKeyRange, ) -> Pin<Box<dyn Future<Output = Result<MultiVersionBatch, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source§

fn prefix<'life0, 'life1, 'async_trait>( &'life0 mut self, prefix: &'life1 EncodedKey, ) -> Pin<Box<dyn Future<Output = Result<MultiVersionBatch, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source§

fn prefix_rev<'life0, 'life1, 'async_trait>( &'life0 mut self, prefix: &'life1 EncodedKey, ) -> Pin<Box<dyn Future<Output = Result<MultiVersionBatch, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source§

fn read_as_of_version_inclusive<'life0, 'async_trait>( &'life0 mut self, version: CommitVersion, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source§

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

Source§

type SingleVersionQuery<'b> = <StandardQueryTransaction as QueryTransaction>::SingleVersionQuery<'b> where Self: 'b

Source§

type CdcQuery<'b> = <StandardQueryTransaction as QueryTransaction>::CdcQuery<'b> where Self: 'b

Source§

fn begin_single_query<'c, 'life0, 'async_trait, I>( &'life0 self, keys: I, ) -> Pin<Box<dyn Future<Output = Result<Self::SingleVersionQuery<'_>>> + Send + 'async_trait>>
where I: IntoIterator<Item = &'c EncodedKey> + Send + 'async_trait, Self: 'async_trait, 'c: 'async_trait, 'life0: 'async_trait,

Source§

fn begin_cdc_query<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::CdcQuery<'_>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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