Skip to main content

Transaction

Enum Transaction 

Source
pub enum Transaction<'a> {
    Command(&'a mut CommandTransaction),
    Admin(&'a mut AdminTransaction),
    Query(&'a mut QueryTransaction),
    Test(Box<TestTransaction<'a>>),
}

Variants§

§

Command(&'a mut CommandTransaction)

§

Admin(&'a mut AdminTransaction)

§

Query(&'a mut QueryTransaction)

§

Test(Box<TestTransaction<'a>>)

Implementations§

Source§

impl<'a> Transaction<'a>

Source

pub fn version(&self) -> CommitVersion

Source

pub fn id(&self) -> TransactionId

Source

pub fn has_unprocessed_flow_changes(&self) -> bool

Source

pub fn unprocessed_flow_change_objects(&self) -> Vec<ObjectId>

Source

pub fn get<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<Option<MultiVersionRow<TaggedKey>>>

Source

pub fn get_committed<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<Option<MultiVersionRow<TaggedKey>>>

Source

pub fn contains<K: Into<TaggedKey> + Clone>(&mut self, key: &K) -> Result<bool>

Source

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

Source

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

Source

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

Source

pub fn range( &mut self, range: TaggedKeyBoundRange, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<TaggedKey>>> + Send + '_>>

Source

pub fn range_row( &mut self, storage: StorageId, start: Bound<StorageRowKey>, end: Bound<StorageRowKey>, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<StorageRowKey>>> + Send + '_>>

Source

pub fn range_partitioned_row( &mut self, storage: StorageId, start: Bound<StoragePartitionedRowKey>, end: Bound<StoragePartitionedRowKey>, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<StoragePartitionedRowKey>>> + Send + '_>>

Source

pub fn range_rev( &mut self, range: TaggedKeyBoundRange, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<TaggedKey>>> + Send + '_>>

Source§

impl<'a> Transaction<'a>

Source

pub fn identity(&self) -> IdentityId

Source

pub fn set_identity(&mut self, identity: IdentityId)

Source

pub fn rql(&mut self, rql: &str, params: Params) -> ExecutionResult

Source

pub fn reborrow(&mut self) -> Transaction<'_>

Source

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

Source

pub fn admin(self) -> &'a mut AdminTransaction

Source

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

Source

pub fn admin_mut(&mut self) -> &mut AdminTransaction

Source

pub fn begin_single_query<'b, I>( &self, keys: I, ) -> Result<SingleReadTransaction<'_>>
where I: IntoIterator<Item = &'b EncodedKey>,

Source

pub fn begin_single_command<'b, I>( &self, keys: I, ) -> Result<SingleWriteTransaction<'_>>
where I: IntoIterator<Item = &'b EncodedKey>,

Source

pub fn single(&self) -> Option<&SingleTransaction>

Source

pub fn set<K: Into<TaggedKey> + Clone>( &mut self, key: &K, bytes: impl Into<EncodedBytes>, ) -> Result<()>

Source

pub fn remove_with_pre<K: Into<TaggedKey> + Clone>( &mut self, key: &K, pre: EncodedBytes, ) -> Result<()>

Source

pub fn remove<K: Into<TaggedKey> + Clone>(&mut self, key: &K) -> Result<()>

Source

pub fn mark_preexisting<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<()>

Source

pub fn track_row_change(&mut self, changes: &[RowChange])

Source

pub fn track_flow_change(&mut self, change: Change)

Source

pub fn record_test_event( &mut self, namespace: String, event: String, variant: String, depth: u8, columns: Columns, )

Source

pub fn record_test_handler(&mut self, invocation: CapturedInvocation)

Trait Implementations§

Source§

impl<'a> From<&'a mut AdminTransaction> for Transaction<'a>

Source§

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

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut CommandTransaction> for Transaction<'a>

Source§

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

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut QueryTransaction> for Transaction<'a>

Source§

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

Converts to this type from the input type.
Source§

impl WithInterceptors for Transaction<'_>

Source§

fn table_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPreInsertInterceptor + Send + Sync>

Source§

fn table_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPostInsertInterceptor + Send + Sync>

Source§

fn table_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPreUpdateInterceptor + Send + Sync>

Source§

fn table_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPostUpdateInterceptor + Send + Sync>

Source§

fn table_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPreDeleteInterceptor + Send + Sync>

Source§

fn table_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPostDeleteInterceptor + Send + Sync>

Source§

fn ringbuffer_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPreInsertInterceptor + Send + Sync>

Source§

fn ringbuffer_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPostInsertInterceptor + Send + Sync>

Source§

fn ringbuffer_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPreUpdateInterceptor + Send + Sync>

Source§

fn ringbuffer_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPostUpdateInterceptor + Send + Sync>

Source§

fn ringbuffer_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPreDeleteInterceptor + Send + Sync>

Source§

fn ringbuffer_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPostDeleteInterceptor + Send + Sync>

Source§

fn pre_commit_interceptors( &mut self, ) -> &mut Chain<dyn PreCommitInterceptor + Send + Sync>

Source§

fn post_commit_interceptors( &mut self, ) -> &mut Chain<dyn PostCommitInterceptor + Send + Sync>

Source§

fn namespace_post_create_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePostCreateInterceptor + Send + Sync>

Source§

fn namespace_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePreUpdateInterceptor + Send + Sync>

Source§

fn namespace_post_update_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePostUpdateInterceptor + Send + Sync>

Source§

fn namespace_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePreDeleteInterceptor + Send + Sync>

Source§

fn table_post_create_interceptors( &mut self, ) -> &mut Chain<dyn TablePostCreateInterceptor + Send + Sync>

Source§

fn table_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn TablePreUpdateInterceptor + Send + Sync>

Source§

fn table_post_update_interceptors( &mut self, ) -> &mut Chain<dyn TablePostUpdateInterceptor + Send + Sync>

Source§

fn table_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn TablePreDeleteInterceptor + Send + Sync>

Source§

fn view_post_create_interceptors( &mut self, ) -> &mut Chain<dyn ViewPostCreateInterceptor + Send + Sync>

Source§

fn view_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn ViewPreUpdateInterceptor + Send + Sync>

Source§

fn view_post_update_interceptors( &mut self, ) -> &mut Chain<dyn ViewPostUpdateInterceptor + Send + Sync>

Source§

fn view_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn ViewPreDeleteInterceptor + Send + Sync>

Source§

fn ringbuffer_post_create_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPostCreateInterceptor + Send + Sync>

Source§

fn ringbuffer_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPreUpdateInterceptor + Send + Sync>

Source§

fn ringbuffer_post_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPostUpdateInterceptor + Send + Sync>

Source§

fn ringbuffer_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPreDeleteInterceptor + Send + Sync>

Source§

fn dictionary_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPreInsertInterceptor + Send + Sync>

Source§

fn dictionary_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPostInsertInterceptor + Send + Sync>

Source§

fn dictionary_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPreUpdateInterceptor + Send + Sync>

Source§

fn dictionary_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPostUpdateInterceptor + Send + Sync>

Source§

fn dictionary_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPreDeleteInterceptor + Send + Sync>

Source§

fn dictionary_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPostDeleteInterceptor + Send + Sync>

Source§

fn dictionary_post_create_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPostCreateInterceptor + Send + Sync>

Source§

fn dictionary_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPreUpdateInterceptor + Send + Sync>

Source§

fn dictionary_post_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPostUpdateInterceptor + Send + Sync>

Source§

fn dictionary_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPreDeleteInterceptor + Send + Sync>

Source§

fn series_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPreInsertInterceptor + Send + Sync>

Source§

fn series_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPostInsertInterceptor + Send + Sync>

Source§

fn series_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPreUpdateInterceptor + Send + Sync>

Source§

fn series_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPostUpdateInterceptor + Send + Sync>

Source§

fn series_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPreDeleteInterceptor + Send + Sync>

Source§

fn series_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPostDeleteInterceptor + Send + Sync>

Source§

fn series_post_create_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPostCreateInterceptor + Send + Sync>

Source§

fn series_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPreUpdateInterceptor + Send + Sync>

Source§

fn series_post_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPostUpdateInterceptor + Send + Sync>

Source§

fn series_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPreDeleteInterceptor + Send + Sync>

Source§

fn identity_post_create_interceptors( &mut self, ) -> &mut Chain<dyn IdentityPostCreateInterceptor + Send + Sync>

Source§

fn identity_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn IdentityPreDeleteInterceptor + Send + Sync>

Source§

fn role_post_create_interceptors( &mut self, ) -> &mut Chain<dyn RolePostCreateInterceptor + Send + Sync>

Source§

fn role_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn RolePreDeleteInterceptor + Send + Sync>

Source§

fn granted_role_post_create_interceptors( &mut self, ) -> &mut Chain<dyn GrantedRolePostCreateInterceptor + Send + Sync>

Source§

fn granted_role_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn GrantedRolePreDeleteInterceptor + Send + Sync>

Source§

fn identity_attribute_post_create_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributePostCreateInterceptor + Send + Sync>

Source§

fn identity_attribute_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributePreDeleteInterceptor + Send + Sync>

Source§

fn identity_attribute_value_post_create_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributeValuePostCreateInterceptor + Send + Sync>

Source§

fn identity_attribute_value_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributeValuePreDeleteInterceptor + Send + Sync>

Source§

fn authentication_post_create_interceptors( &mut self, ) -> &mut Chain<dyn AuthenticationPostCreateInterceptor + Send + Sync>

Source§

fn authentication_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn AuthenticationPreDeleteInterceptor + Send + Sync>

Auto Trait Implementations§

§

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

§

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

§

impl<'a> Freeze for Transaction<'a>

§

impl<'a> Send for Transaction<'a>

§

impl<'a> Sync for Transaction<'a>

§

impl<'a> Unpin for Transaction<'a>

§

impl<'a> UnsafeUnpin for Transaction<'a>

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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