pub struct ExecutionUnit { /* private fields */ }Expand description
An atomic unit of execution within a subscription set. Currently just a single query plan, however in the future this could be multiple query plans, such as those of an incremental join.
Implementations§
Source§impl ExecutionUnit
impl ExecutionUnit
pub fn new(eval_plan: SupportedQuery, hash: QueryHash) -> Result<Self, DBError>
Sourcepub fn return_table(&self) -> TableId
pub fn return_table(&self) -> TableId
The table from which this query returns rows.
pub fn return_name(&self) -> Box<str>
Sourcepub fn filter_table(&self) -> TableId
pub fn filter_table(&self) -> TableId
The table on which this query filters rows. In the case of a single table select, this is the same as the return table. In the case of a semijoin, it is the auxiliary table against which we are joining.
Sourcepub fn eval<F: WebsocketFormat>(
&self,
db: &RelationalDB,
tx: &Tx,
sql: &str,
slow_query_threshold: Option<Duration>,
compression: Compression,
) -> Option<TableUpdate<F>>
pub fn eval<F: WebsocketFormat>( &self, db: &RelationalDB, tx: &Tx, sql: &str, slow_query_threshold: Option<Duration>, compression: Compression, ) -> Option<TableUpdate<F>>
Evaluate this execution unit against the database using the specified format.
Sourcepub fn eval_incr<'a>(
&'a self,
db: &'a RelationalDB,
tx: &'a TxMode<'a>,
sql: &'a str,
tables: impl 'a + Clone + Iterator<Item = &'a DatabaseTableUpdate>,
slow_query_threshold: Option<Duration>,
) -> Option<DatabaseTableUpdateRelValue<'a>>
pub fn eval_incr<'a>( &'a self, db: &'a RelationalDB, tx: &'a TxMode<'a>, sql: &'a str, tables: impl 'a + Clone + Iterator<Item = &'a DatabaseTableUpdate>, slow_query_threshold: Option<Duration>, ) -> Option<DatabaseTableUpdateRelValue<'a>>
Evaluate this execution unit against the given delta tables.
Sourcepub fn row_estimate(&self, tx: &TxId) -> u64
pub fn row_estimate(&self, tx: &TxId) -> u64
The estimated number of rows returned by this execution unit.
Trait Implementations§
Source§impl AuthAccess for ExecutionUnit
impl AuthAccess for ExecutionUnit
Source§impl Debug for ExecutionUnit
impl Debug for ExecutionUnit
Source§impl From<SupportedQuery> for ExecutionUnit
impl From<SupportedQuery> for ExecutionUnit
Source§fn from(plan: SupportedQuery) -> Self
fn from(plan: SupportedQuery) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ExecutionUnit
impl PartialEq for ExecutionUnit
impl Eq for ExecutionUnit
An ExecutionUnit is uniquely identified by its QueryHash.
Auto Trait Implementations§
impl Freeze for ExecutionUnit
impl RefUnwindSafe for ExecutionUnit
impl Send for ExecutionUnit
impl Sync for ExecutionUnit
impl Unpin for ExecutionUnit
impl UnwindSafe for ExecutionUnit
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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