ExecutionUnit

Struct ExecutionUnit 

Source
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

Source

pub fn new(eval_plan: SupportedQuery, hash: QueryHash) -> Result<Self, DBError>

Source

pub fn kind(&self) -> Supported

Is this a single table select or a semijoin?

Source

pub fn hash(&self) -> QueryHash

The unique query hash for this execution unit.

Source

pub fn return_table(&self) -> TableId

The table from which this query returns rows.

Source

pub fn return_name(&self) -> Box<str>

Source

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.

Source

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.

Source

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.

Source

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

Source§

fn check_auth(&self, owner: Identity, caller: Identity) -> Result<(), AuthError>

Source§

impl Debug for ExecutionUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<SupportedQuery> for ExecutionUnit

Source§

fn from(plan: SupportedQuery) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExecutionUnit

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ExecutionUnit

An ExecutionUnit is uniquely identified by its QueryHash.

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T