pub enum RelExpr {
RelVar(Arc<TableSchema>, TyId),
Select(Box<Select>),
Proj(Box<Project>),
Join(Box<[RelExpr]>, TyId),
Union(Box<RelExpr>, Box<RelExpr>),
Minus(Box<RelExpr>, Box<RelExpr>),
Dedup(Box<RelExpr>),
}Expand description
A logical relational expression
Variants§
RelVar(Arc<TableSchema>, TyId)
A base table
Select(Box<Select>)
A filter
Proj(Box<Project>)
A projection
Join(Box<[RelExpr]>, TyId)
An n-ary join
Union(Box<RelExpr>, Box<RelExpr>)
Bag union
Minus(Box<RelExpr>, Box<RelExpr>)
Bag difference
Dedup(Box<RelExpr>)
Bag -> set
Implementations§
Source§impl RelExpr
impl RelExpr
Sourcepub fn project(input: RelExpr, expr: Let) -> Self
pub fn project(input: RelExpr, expr: Let) -> Self
Instantiate a projection RelExpr::Proj
Sourcepub fn select(input: RelExpr, expr: Let) -> Self
pub fn select(input: RelExpr, expr: Let) -> Self
Instantiate a selection RelExpr::Select
Sourcepub fn ty<'a>(&self, ctx: &'a TyCtx) -> Result<TypeWithCtx<'a>, InvalidTypeId>
pub fn ty<'a>(&self, ctx: &'a TyCtx) -> Result<TypeWithCtx<'a>, InvalidTypeId>
The type of this relation expression
pub fn table_id(&self, ctx: &mut TyCtx) -> Result<TableId, TypingError>
Trait Implementations§
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> 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