pub struct SubqueryDef {
pub id: usize,
pub subquery_type: SubqueryType,
pub compare_var: Option<Var>,
pub result_var: Option<Var>,
pub outer_refs: Vec<Var>,
pub is_correlated: bool,
}Expand description
A subquery definition
Fields§
§id: usizeUnique identifier for this subquery
subquery_type: SubqueryTypeType of subquery
compare_var: Option<Var>Variable to compare against (for IN, ANY, ALL)
result_var: Option<Var>Result variable name (for scalar subqueries)
outer_refs: Vec<Var>Variables referenced from outer query (for correlation detection)
Whether this subquery is correlated (references outer variables)
Implementations§
Source§impl SubqueryDef
impl SubqueryDef
Sourcepub fn scalar(id: usize, result_var: Var) -> SubqueryDef
pub fn scalar(id: usize, result_var: Var) -> SubqueryDef
Create a scalar subquery
Sourcepub fn exists(id: usize, negated: bool) -> SubqueryDef
pub fn exists(id: usize, negated: bool) -> SubqueryDef
Create an EXISTS subquery
Sourcepub fn in_list(id: usize, compare_var: Var, negated: bool) -> SubqueryDef
pub fn in_list(id: usize, compare_var: Var, negated: bool) -> SubqueryDef
Create an IN subquery
Sourcepub fn with_outer_refs(self, refs: Vec<Var>) -> SubqueryDef
pub fn with_outer_refs(self, refs: Vec<Var>) -> SubqueryDef
Mark as correlated with outer references
Trait Implementations§
Source§impl Clone for SubqueryDef
impl Clone for SubqueryDef
Source§fn clone(&self) -> SubqueryDef
fn clone(&self) -> SubqueryDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubqueryDef
impl RefUnwindSafe for SubqueryDef
impl Send for SubqueryDef
impl Sync for SubqueryDef
impl Unpin for SubqueryDef
impl UnsafeUnpin for SubqueryDef
impl UnwindSafe for SubqueryDef
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,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request