Struct sql::plan::query::ExprContext [−][src]
pub struct ExprContext<'a> {
pub qcx: &'a QueryContext<'a>,
pub name: &'a str,
pub scope: &'a Scope,
pub relation_type: &'a RelationType,
pub allow_aggregates: bool,
pub allow_subqueries: bool,
pub allow_windows: bool,
}
Expand description
A bundle of unrelated things that we need for planning Expr
s.
Fields
qcx: &'a QueryContext<'a>
name: &'a str
The name of this kind of expression eg “WHERE clause”. Used only for error messages.
scope: &'a Scope
The context for the Query
that contains this Expr
.
The current scope.
relation_type: &'a RelationType
The type of the current relation expression upon which this scalar expression will be evaluated.
allow_aggregates: bool
Are aggregate functions allowed in this context
allow_subqueries: bool
Are subqueries allowed in this context
allow_windows: bool
Are window functions allowed in this context
Implementations
pub fn scalar_type<E>(
&self,
expr: &E
) -> <E::Type as AbstractColumnType>::AbstractScalarType where
E: AbstractExpr,
Trait Implementations
Extracts a reference to the recursion guard embedded within the type.
fn checked_recur<F, T, E>(&self, f: F) -> Result<T, E> where
F: FnOnce(&Self) -> Result<T, E>,
E: From<RecursionLimitError>,
fn checked_recur<F, T, E>(&self, f: F) -> Result<T, E> where
F: FnOnce(&Self) -> Result<T, E>,
E: From<RecursionLimitError>,
Checks whether it is safe to recur and calls f
if so. Read more
fn checked_recur_mut<F, T, E>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self) -> Result<T, E>,
E: From<RecursionLimitError>,
fn checked_recur_mut<F, T, E>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self) -> Result<T, E>,
E: From<RecursionLimitError>,
Like CheckedRecursion::checked_recur
, but operates on a mutable
reference to Self
. Read more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ExprContext<'a>
impl<'a> !Send for ExprContext<'a>
impl<'a> !Sync for ExprContext<'a>
impl<'a> Unpin for ExprContext<'a>
impl<'a> !UnwindSafe for ExprContext<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more