pub enum ProjectList {
Name(ProjectName),
List(RelExpr, Vec<(Box<str>, FieldProject)>),
Limit(Box<ProjectList>, u64),
Agg(RelExpr, AggType, Box<str>, AlgebraicType),
}Expand description
A projection is the root of any relational expression. This type represents a projection that returns fields.
For example:
select a, b from tand
select t.a as x from t join s ...Variants§
Name(ProjectName)
List(RelExpr, Vec<(Box<str>, FieldProject)>)
Limit(Box<ProjectList>, u64)
Agg(RelExpr, AggType, Box<str>, AlgebraicType)
Implementations§
Source§impl ProjectList
impl ProjectList
Sourcepub fn return_table(&self) -> Option<&TableSchema>
pub fn return_table(&self) -> Option<&TableSchema>
Does this expression project a single relvar? If so, we return it’s TableSchema. If not, it projects a list of columns, so we return None.
Sourcepub fn return_table_id(&self) -> Option<TableId>
pub fn return_table_id(&self) -> Option<TableId>
Sourcepub fn for_each_return_field(&self, f: impl FnMut(&str, &AlgebraicType))
pub fn for_each_return_field(&self, f: impl FnMut(&str, &AlgebraicType))
Iterate over the projected column names and types
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProjectList
impl RefUnwindSafe for ProjectList
impl Send for ProjectList
impl Sync for ProjectList
impl Unpin for ProjectList
impl UnwindSafe for ProjectList
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