pub enum RelExpr {
RelVar(Relvar),
Select(Box<RelExpr>, Expr),
LeftDeepJoin(LeftDeepJoin),
EqJoin(LeftDeepJoin, FieldProject, FieldProject),
}Expand description
A logical relational expression
Variants§
RelVar(Relvar)
A relvar or table reference
Select(Box<RelExpr>, Expr)
A logical select for filter
LeftDeepJoin(LeftDeepJoin)
A left deep binary cross product
EqJoin(LeftDeepJoin, FieldProject, FieldProject)
A left deep binary equi-join
Implementations§
Source§impl RelExpr
impl RelExpr
Sourcepub fn visit(&self, f: &mut impl FnMut(&Self))
pub fn visit(&self, f: &mut impl FnMut(&Self))
Walk the expression tree and call f on each node
Sourcepub fn visit_mut(&mut self, f: &mut impl FnMut(&mut Self))
pub fn visit_mut(&mut self, f: &mut impl FnMut(&mut Self))
Walk the expression tree and call f on each node
Sourcepub fn find_table_schema(&self, alias: &str) -> Option<&TableSchema>
pub fn find_table_schema(&self, alias: &str) -> Option<&TableSchema>
Return the TableSchema for a relvar in the expression
Sourcepub fn find_table_id(&self, alias: &str) -> Option<TableId>
pub fn find_table_id(&self, alias: &str) -> Option<TableId>
Return the TableId for a relvar in the expression
Sourcepub fn return_table(&self) -> Option<&TableSchema>
pub fn return_table(&self) -> Option<&TableSchema>
Does this expression return a single relvar? If so, return it’s TableSchema, otherwise return None.
Sourcepub fn return_table_id(&self) -> Option<TableId>
pub fn return_table_id(&self) -> Option<TableId>
Sourcepub fn return_name(&self) -> Option<&str>
pub fn return_name(&self) -> Option<&str>
Does this expression return a single relvar? If so, return its name or equivalently its alias.
Trait Implementations§
impl Eq for RelExpr
impl StructuralPartialEq for RelExpr
Auto Trait Implementations§
impl Freeze for RelExpr
impl RefUnwindSafe for RelExpr
impl Send for RelExpr
impl Sync for RelExpr
impl Unpin for RelExpr
impl UnwindSafe for RelExpr
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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