pub enum FlowTransaction {
Deferred {
inner: FlowTransactionInner,
},
Transactional {
inner: FlowTransactionInner,
base_pending: Pending,
view_overlay: Arc<Vec<Change>>,
},
Ephemeral {
inner: FlowTransactionInner,
state: HashMap<EncodedKey, EncodedRow>,
},
Committing {
inner: FlowTransactionInner,
cmd: Box<CommandTransaction>,
},
}Variants§
Implementations§
Source§impl FlowTransaction
impl FlowTransaction
pub fn find_dictionary(&self, id: DictionaryId) -> Option<Dictionary>
pub fn find_dictionary_by_name(&self, name: &str) -> Option<Dictionary>
pub fn find_in_dictionary( &mut self, dictionary: &Dictionary, value: &Value, ) -> Result<Option<DictionaryEntryId>>
pub fn get_from_dictionary( &mut self, dictionary: &Dictionary, id: DictionaryEntryId, ) -> Result<Option<Value>>
Source§impl FlowTransaction
impl FlowTransaction
pub fn get(&mut self, key: &EncodedKey) -> Result<Option<EncodedRow>>
pub fn contains_key(&mut self, key: &EncodedKey) -> Result<bool>
pub fn prefix(&mut self, prefix: &EncodedKey) -> Result<MultiVersionBatch>
pub fn range( &mut self, range: EncodedKeyRange, scope: RangeScope, batch_size: usize, ) -> Box<dyn Iterator<Item = Result<MultiVersionRow>> + Send + '_>
pub fn range_rev( &mut self, range: EncodedKeyRange, scope: RangeScope, batch_size: usize, ) -> Box<dyn Iterator<Item = Result<MultiVersionRow>> + Send + '_>
Source§impl FlowTransaction
impl FlowTransaction
pub fn state_get( &mut self, id: FlowNodeId, key: &EncodedKey, ) -> Result<Option<EncodedRow>>
pub fn state_get_many( &mut self, id: FlowNodeId, keys: &[EncodedKey], ) -> Result<MultiVersionBatch>
pub fn prefetch_state( &mut self, id: FlowNodeId, keys: &[EncodedKey], ) -> Result<()>
pub fn state_set( &mut self, id: FlowNodeId, key: &EncodedKey, value: EncodedRow, ) -> Result<()>
pub fn state_remove(&mut self, id: FlowNodeId, key: &EncodedKey) -> Result<()>
pub fn state_drop(&mut self, id: FlowNodeId, key: &EncodedKey) -> Result<()>
pub fn internal_state_get( &mut self, id: FlowNodeId, key: &EncodedKey, ) -> Result<Option<EncodedRow>>
pub fn internal_state_get_many( &mut self, id: FlowNodeId, keys: &[EncodedKey], ) -> Result<MultiVersionBatch>
pub fn internal_state_set( &mut self, id: FlowNodeId, key: &EncodedKey, value: EncodedRow, ) -> Result<()>
pub fn internal_state_remove( &mut self, id: FlowNodeId, key: &EncodedKey, ) -> Result<()>
pub fn internal_state_drop( &mut self, id: FlowNodeId, key: &EncodedKey, ) -> Result<()>
pub fn state_scan_all(&mut self, id: FlowNodeId) -> Result<MultiVersionBatch>
pub fn state_range_all( &mut self, id: FlowNodeId, range: EncodedKeyRange, ) -> Result<MultiVersionBatch>
pub fn internal_state_range_all( &mut self, id: FlowNodeId, range: EncodedKeyRange, ) -> Result<MultiVersionBatch>
pub fn state_clear(&mut self, id: FlowNodeId) -> Result<()>
pub fn load_or_create_row( &mut self, id: FlowNodeId, key: &EncodedKey, shape: &RowShape, ) -> Result<EncodedRow>
pub fn save_row( &mut self, id: FlowNodeId, key: &EncodedKey, row: EncodedRow, ) -> Result<()>
Source§impl FlowTransaction
impl FlowTransaction
pub fn set(&mut self, key: &EncodedKey, value: EncodedRow) -> Result<()>
pub fn remove(&mut self, key: &EncodedKey) -> Result<()>
pub fn drop_key(&mut self, key: &EncodedKey) -> Result<()>
pub fn set_batch( &mut self, keys: &[EncodedKey], values: &[EncodedRow], ) -> Result<()>
pub fn remove_batch(&mut self, keys: &[EncodedKey]) -> Result<()>
pub fn drop_keys(&mut self, keys: &[EncodedKey]) -> Result<()>
Source§impl FlowTransaction
impl FlowTransaction
pub fn deferred( parent: &AdminTransaction, version: CommitVersion, catalog: Catalog, interceptors: Interceptors, clock: Clock, ) -> Self
pub fn deferred_from_parts(params: DeferredParams) -> Self
pub fn committing(params: CommittingParams) -> Result<Self>
pub fn commit(self) -> Result<CommitVersion>
pub fn transactional(params: TransactionalParams) -> Self
pub fn row_allocators(&self) -> RowAllocatorRegistry
pub fn dictionary_allocators(&self) -> DictionaryAllocatorRegistry
pub fn view_overlay(&self) -> Option<Arc<Vec<Change>>>
pub fn ephemeral( version: CommitVersion, query: MultiReadTransaction, single: SingleTransaction, catalog: Catalog, state: HashMap<EncodedKey, EncodedRow>, clock: Clock, ) -> Self
pub fn merge_state(&mut self)
pub fn take_state(&mut self) -> HashMap<EncodedKey, EncodedRow>
pub fn version(&self) -> CommitVersion
pub fn take_pending(&mut self) -> Pending
pub fn take_pending_shapes(&mut self) -> Vec<RowShape>
pub fn track_flow_change(&mut self, change: Change)
pub fn take_accumulator_entries(&mut self) -> Vec<(ShapeId, Diff)>
pub fn update_version(&mut self, new_version: CommitVersion)
pub fn catalog(&self) -> &Catalog
pub fn host_catalog(&self) -> &dyn HostCatalog
pub fn clock(&self) -> &Clock
pub fn operator_state<S, F>( &mut self, node: FlowNodeId, load: F, ) -> Result<&mut S>
pub fn mark_state_dirty(&mut self, node: FlowNodeId)
pub fn take_operator_state<S, F>( &mut self, node: FlowNodeId, load: F, ) -> Result<(S, PersistFn)>
pub fn put_operator_state<S>(
&mut self,
node: FlowNodeId,
state: S,
persist: PersistFn,
)where
S: 'static + Send,
pub fn flush_operator_states(&mut self) -> Result<()>
pub fn install_operator_states( &mut self, states: HashMap<FlowNodeId, Box<dyn Any + Send>>, )
pub fn drain_operator_states( &mut self, ) -> HashMap<FlowNodeId, Box<dyn Any + Send>>
Trait Implementations§
Source§impl DictionaryReader for FlowTransaction
impl DictionaryReader for FlowTransaction
fn read(&mut self, key: &EncodedKey) -> Result<Option<EncodedRow>>
fn max_index_id(&mut self, dictionary: DictionaryId) -> Result<Option<u128>>
Source§impl WithInterceptors for FlowTransaction
impl WithInterceptors for FlowTransaction
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_update_interceptors( &mut self, ) -> &mut Chain<dyn IdentityPreUpdateInterceptor + Send + Sync>
fn identity_post_update_interceptors( &mut self, ) -> &mut Chain<dyn IdentityPostUpdateInterceptor + 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_update_interceptors( &mut self, ) -> &mut Chain<dyn RolePreUpdateInterceptor + Send + Sync>
fn role_post_update_interceptors( &mut self, ) -> &mut Chain<dyn RolePostUpdateInterceptor + 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 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>
Auto Trait Implementations§
impl !RefUnwindSafe for FlowTransaction
impl !Sync for FlowTransaction
impl !UnwindSafe for FlowTransaction
impl Freeze for FlowTransaction
impl Send for FlowTransaction
impl Unpin for FlowTransaction
impl UnsafeUnpin for FlowTransaction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request