Struct ExprInSubquery
pub struct ExprInSubquery {
pub expr: Box<Expr>,
pub query: Box<Query>,
pub negated: bool,
pub relation_key: bool,
}Expand description
Tests whether a value is in the results of a subquery.
Returns true if expr matches any row returned by query, or the
opposite when negated is set. The flag makes NOT IN a predicate in
its own right rather than the negation of IN: statement normalization
attaches variant guards to the predicate before expanding the negated
form to not(in_subquery(..)), so the guards end up outside the
negation.
§Examples
in_subquery(x, select(...)) // returns `true` if `x` is in the subquery results
not_in_subquery(x, select(...)) // returns `true` if `x` is not in the subquery resultsFields§
§expr: Box<Expr>The value to search for.
query: Box<Query>The subquery to search within.
negated: boolWhether the check is NOT IN.
relation_key: boolWhether this compares relation keys rather than application values.
Relation lifting sets this when it rewrites a relation membership into a key comparison. A relation key identifies a row only when it is present, so an absent key on either side never matches. A value membership compares the values themselves.
Temporary: this marks the one membership that needs two-valued results before application predicates have their own representation. Remove it once https://github.com/tokio-rs/toasty/pull/1251 lands, since that lowers lifted relation memberships as application predicates.
Trait Implementations§
§impl Clone for ExprInSubquery
impl Clone for ExprInSubquery
§fn clone(&self) -> ExprInSubquery
fn clone(&self) -> ExprInSubquery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more