pub struct EvalCtx<'a> {
pub resolver: Option<&'a Resolver<'a>>,
pub outer: Option<&'a Bound<'a>>,
}Expand description
What an expression may reach beyond its own row.
Both fields exist for subqueries. The resolver is what lets a subquery
RUN from inside an expression, and outer is the enclosing query’s row, so
WHERE attrelid = c.oid inside ARRAY(SELECT ... FROM pg_attribute a ...)
can see c — a correlated subquery, which is what every one of psql’s
subqueries is.
Scoping follows SQL: a name resolves in the innermost query that binds it,
and only then in the enclosing one. That matters for the bare column in
\dp’s WHERE oid = ANY (polroles): oid is the inner pg_roles
row’s, polroles is the outer pg_policy row’s, and neither is qualified.
Fields§
§resolver: Option<&'a Resolver<'a>>§outer: Option<&'a Bound<'a>>Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EvalCtx<'a>
impl<'a> !Send for EvalCtx<'a>
impl<'a> !Sync for EvalCtx<'a>
impl<'a> !UnwindSafe for EvalCtx<'a>
impl<'a> Freeze for EvalCtx<'a>
impl<'a> Unpin for EvalCtx<'a>
impl<'a> UnsafeUnpin for EvalCtx<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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