pub struct CommandTransaction {
pub multi: MultiTransaction,
pub single: SingleTransaction,
pub cmd: Option<MultiWriteTransaction>,
pub event_bus: EventBus,
pub identity: IdentityId,
/* private fields */
}Fields§
§multi: MultiTransaction§single: SingleTransaction§cmd: Option<MultiWriteTransaction>§event_bus: EventBus§identity: IdentityIdImplementations§
Source§impl CommandTransaction
impl CommandTransaction
pub fn new( multi: MultiTransaction, single: SingleTransaction, event_bus: EventBus, interceptors: Interceptors, identity: IdentityId, clock: Clock, ) -> Result<Self>
pub fn set_executor(&mut self, executor: Arc<dyn RqlExecutor>)
pub fn set_dictionary_allocators( &mut self, registry: DictionaryAllocatorRegistry, )
pub fn dictionary_allocators(&self) -> Option<DictionaryAllocatorRegistry>
pub fn rql(&mut self, rql: &str, params: Params) -> ExecutionResult
pub fn event_bus(&self) -> &EventBus
pub fn commit(&mut self) -> Result<CommitVersion>
pub fn execute_bulk_unchecked<F, R>(&mut self, body: F) -> Result<R>
pub fn commit_unchecked(&mut self) -> Result<CommitVersion>
pub fn rollback(&mut self) -> Result<()>
pub fn pending_writes(&self) -> &PendingWrites
pub fn with_single_command<'a, I, F, R>(&self, keys: I, f: F) -> Result<R>where
I: IntoIterator<Item = &'a EncodedKey> + Send,
F: FnOnce(&mut SingleWriteTransaction<'_>) -> Result<R> + Send,
R: Send,
pub fn begin_single_query<'a, I>(
&self,
keys: I,
) -> Result<SingleReadTransaction<'_>>where
I: IntoIterator<Item = &'a EncodedKey>,
pub fn begin_single_command<'a, I>(
&self,
keys: I,
) -> Result<SingleWriteTransaction<'_>>where
I: IntoIterator<Item = &'a EncodedKey>,
pub fn track_row_change(&mut self, changes: &[RowChange])
pub fn track_flow_change(&mut self, change: Change)
pub fn version(&self) -> CommitVersion
pub fn id(&self) -> TransactionId
pub fn get<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<Option<MultiVersionRow<TaggedKey>>>
pub fn get_committed<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<Option<MultiVersionRow<TaggedKey>>>
pub fn contains<K: Into<TaggedKey> + Clone>(&mut self, key: &K) -> Result<bool>
pub fn prefix( &mut self, prefix: &EncodedKey, ) -> Result<MultiVersionBatch<TaggedKey>>
pub fn prefix_rev( &mut self, prefix: &EncodedKey, ) -> Result<MultiVersionBatch<TaggedKey>>
pub fn read_as_of_version_exclusive( &mut self, version: CommitVersion, ) -> Result<()>
pub fn stamp_source(&mut self, source: SourceVersion) -> Result<()>
pub fn set<K: Into<TaggedKey> + Clone>( &mut self, key: &K, bytes: impl Into<EncodedBytes>, ) -> Result<()>
pub fn reserve_writes(&mut self, additional: usize) -> Result<()>
pub fn disable_conflict_tracking(&mut self) -> Result<()>
pub fn remove_with_pre<K: Into<TaggedKey> + Clone>( &mut self, key: &K, pre: EncodedBytes, ) -> Result<()>
pub fn remove<K: Into<TaggedKey> + Clone>(&mut self, key: &K) -> Result<()>
pub fn remove_unobserved<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<()>
pub fn remove_unobserved_with_pre<K: Into<TaggedKey> + Clone>( &mut self, key: &K, pre: EncodedBytes, ) -> Result<()>
pub fn remove_silent<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<()>
pub fn mark_preexisting<K: Into<TaggedKey> + Clone>( &mut self, key: &K, ) -> Result<()>
pub fn range( &mut self, range: TaggedKeyBoundRange, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<TaggedKey>>> + Send + '_>>
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 + '_>>
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 + '_>>
pub fn range_persistence( &mut self, range: TaggedKeyBoundRange, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<TaggedKey>>> + Send + '_>>
pub fn range_rev( &mut self, range: TaggedKeyBoundRange, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<TaggedKey>>> + Send + '_>>
pub fn range_rev_persistence( &mut self, range: TaggedKeyBoundRange, scope: RangeScope, batch_size: usize, ) -> Result<Box<dyn Iterator<Item = Result<MultiVersionRow<TaggedKey>>> + Send + '_>>
Trait Implementations§
Source§impl Drop for CommandTransaction
impl Drop for CommandTransaction
Source§impl<'a> From<&'a mut CommandTransaction> for Transaction<'a>
impl<'a> From<&'a mut CommandTransaction> for Transaction<'a>
Source§fn from(txn: &'a mut CommandTransaction) -> Self
fn from(txn: &'a mut CommandTransaction) -> Self
Converts to this type from the input type.
Source§impl WithEventBus for CommandTransaction
impl WithEventBus for CommandTransaction
Source§impl WithInterceptors for CommandTransaction
impl WithInterceptors for CommandTransaction
fn table_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPreInsertInterceptor + Send + Sync>
fn table_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPostInsertInterceptor + Send + Sync>
fn table_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPreUpdateInterceptor + Send + Sync>
fn table_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPostUpdateInterceptor + Send + Sync>
fn table_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPreDeleteInterceptor + Send + Sync>
fn table_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn TableRowPostDeleteInterceptor + Send + Sync>
fn ringbuffer_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPreInsertInterceptor + Send + Sync>
fn ringbuffer_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPostInsertInterceptor + Send + Sync>
fn ringbuffer_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPreUpdateInterceptor + Send + Sync>
fn ringbuffer_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPostUpdateInterceptor + Send + Sync>
fn ringbuffer_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPreDeleteInterceptor + Send + Sync>
fn ringbuffer_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferRowPostDeleteInterceptor + Send + Sync>
fn pre_commit_interceptors( &mut self, ) -> &mut Chain<dyn PreCommitInterceptor + Send + Sync>
fn post_commit_interceptors( &mut self, ) -> &mut Chain<dyn PostCommitInterceptor + Send + Sync>
fn namespace_post_create_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePostCreateInterceptor + Send + Sync>
fn namespace_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePreUpdateInterceptor + Send + Sync>
fn namespace_post_update_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePostUpdateInterceptor + Send + Sync>
fn namespace_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn NamespacePreDeleteInterceptor + Send + Sync>
fn table_post_create_interceptors( &mut self, ) -> &mut Chain<dyn TablePostCreateInterceptor + Send + Sync>
fn table_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn TablePreUpdateInterceptor + Send + Sync>
fn table_post_update_interceptors( &mut self, ) -> &mut Chain<dyn TablePostUpdateInterceptor + Send + Sync>
fn table_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn TablePreDeleteInterceptor + Send + Sync>
fn view_post_create_interceptors( &mut self, ) -> &mut Chain<dyn ViewPostCreateInterceptor + Send + Sync>
fn view_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn ViewPreUpdateInterceptor + Send + Sync>
fn view_post_update_interceptors( &mut self, ) -> &mut Chain<dyn ViewPostUpdateInterceptor + Send + Sync>
fn view_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn ViewPreDeleteInterceptor + Send + Sync>
fn ringbuffer_post_create_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPostCreateInterceptor + Send + Sync>
fn ringbuffer_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPreUpdateInterceptor + Send + Sync>
fn ringbuffer_post_update_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPostUpdateInterceptor + Send + Sync>
fn ringbuffer_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn RingBufferPreDeleteInterceptor + Send + Sync>
fn dictionary_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPreInsertInterceptor + Send + Sync>
fn dictionary_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPostInsertInterceptor + Send + Sync>
fn dictionary_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPreUpdateInterceptor + Send + Sync>
fn dictionary_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPostUpdateInterceptor + Send + Sync>
fn dictionary_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPreDeleteInterceptor + Send + Sync>
fn dictionary_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryRowPostDeleteInterceptor + Send + Sync>
fn dictionary_post_create_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPostCreateInterceptor + Send + Sync>
fn dictionary_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPreUpdateInterceptor + Send + Sync>
fn dictionary_post_update_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPostUpdateInterceptor + Send + Sync>
fn dictionary_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn DictionaryPreDeleteInterceptor + Send + Sync>
fn series_row_pre_insert_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPreInsertInterceptor + Send + Sync>
fn series_row_post_insert_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPostInsertInterceptor + Send + Sync>
fn series_row_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPreUpdateInterceptor + Send + Sync>
fn series_row_post_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPostUpdateInterceptor + Send + Sync>
fn series_row_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPreDeleteInterceptor + Send + Sync>
fn series_row_post_delete_interceptors( &mut self, ) -> &mut Chain<dyn SeriesRowPostDeleteInterceptor + Send + Sync>
fn series_post_create_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPostCreateInterceptor + Send + Sync>
fn series_pre_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPreUpdateInterceptor + Send + Sync>
fn series_post_update_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPostUpdateInterceptor + Send + Sync>
fn series_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn SeriesPreDeleteInterceptor + Send + Sync>
fn identity_post_create_interceptors( &mut self, ) -> &mut Chain<dyn IdentityPostCreateInterceptor + Send + Sync>
fn identity_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn IdentityPreDeleteInterceptor + Send + Sync>
fn role_post_create_interceptors( &mut self, ) -> &mut Chain<dyn RolePostCreateInterceptor + Send + Sync>
fn role_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn RolePreDeleteInterceptor + Send + Sync>
fn granted_role_post_create_interceptors( &mut self, ) -> &mut Chain<dyn GrantedRolePostCreateInterceptor + Send + Sync>
fn granted_role_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn GrantedRolePreDeleteInterceptor + Send + Sync>
fn identity_attribute_post_create_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributePostCreateInterceptor + Send + Sync>
fn identity_attribute_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributePreDeleteInterceptor + Send + Sync>
fn identity_attribute_value_post_create_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributeValuePostCreateInterceptor + Send + Sync>
fn identity_attribute_value_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn IdentityAttributeValuePreDeleteInterceptor + Send + Sync>
fn authentication_post_create_interceptors( &mut self, ) -> &mut Chain<dyn AuthenticationPostCreateInterceptor + Send + Sync>
fn authentication_pre_delete_interceptors( &mut self, ) -> &mut Chain<dyn AuthenticationPreDeleteInterceptor + Send + Sync>
Source§impl Write for CommandTransaction
impl Write for CommandTransaction
fn set(&mut self, key: &TaggedKey, bytes: EncodedBytes) -> Result<()>
fn remove_with_pre(&mut self, key: &TaggedKey, pre: EncodedBytes) -> Result<()>
fn remove(&mut self, key: &TaggedKey) -> Result<()>
fn mark_preexisting(&mut self, key: &TaggedKey) -> Result<()>
fn track_row_change(&mut self, changes: &[RowChange])
fn track_flow_change(&mut self, change: Change)
Auto Trait Implementations§
impl !RefUnwindSafe for CommandTransaction
impl !UnwindSafe for CommandTransaction
impl Freeze for CommandTransaction
impl Send for CommandTransaction
impl Sync for CommandTransaction
impl Unpin for CommandTransaction
impl UnsafeUnpin for CommandTransaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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