Enum prql_compiler::ast::pl::expr::TransformKind
source · pub enum TransformKind {
From(Expr),
Derive {
assigns: Vec<Expr>,
tbl: Expr,
},
Select {
assigns: Vec<Expr>,
tbl: Expr,
},
Filter {
filter: Box<Expr>,
tbl: Expr,
},
Aggregate {
assigns: Vec<Expr>,
tbl: Expr,
},
Sort {
by: Vec<ColumnSort<Expr>>,
tbl: Expr,
},
Take {
range: Range,
tbl: Expr,
},
Join {
side: JoinSide,
with: Box<Expr>,
filter: Box<Expr>,
tbl: Expr,
},
Group {
by: Vec<Expr>,
pipeline: Box<Expr>,
tbl: Expr,
},
Window {
kind: WindowKind,
range: Range,
pipeline: Box<Expr>,
tbl: Expr,
},
}
Variants§
Implementations§
source§impl TransformKind
impl TransformKind
sourcepub fn as_from_mut(&mut self) -> Option<&mut Expr>
pub fn as_from_mut(&mut self) -> Option<&mut Expr>
Optionally returns mutable references to the inner fields if this is a TransformKind::From
, otherwise None
sourcepub fn as_from(&self) -> Option<&Expr>
pub fn as_from(&self) -> Option<&Expr>
Optionally returns references to the inner fields if this is a TransformKind::From
, otherwise None
sourcepub fn into_from(self) -> Result<Expr, Self>
pub fn into_from(self) -> Result<Expr, Self>
Returns the inner fields if this is a TransformKind::From
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_derive_mut(&mut self) -> Option<(&mut Vec<Expr>, &mut Expr)>
pub fn as_derive_mut(&mut self) -> Option<(&mut Vec<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Derive
, otherwise None
sourcepub fn as_derive(&self) -> Option<(&Vec<Expr>, &Expr)>
pub fn as_derive(&self) -> Option<(&Vec<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Derive
, otherwise None
sourcepub fn into_derive(self) -> Result<(Vec<Expr>, Expr), Self>
pub fn into_derive(self) -> Result<(Vec<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Derive
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_select_mut(&mut self) -> Option<(&mut Vec<Expr>, &mut Expr)>
pub fn as_select_mut(&mut self) -> Option<(&mut Vec<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Select
, otherwise None
sourcepub fn as_select(&self) -> Option<(&Vec<Expr>, &Expr)>
pub fn as_select(&self) -> Option<(&Vec<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Select
, otherwise None
sourcepub fn into_select(self) -> Result<(Vec<Expr>, Expr), Self>
pub fn into_select(self) -> Result<(Vec<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Select
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_filter_mut(&mut self) -> Option<(&mut Box<Expr>, &mut Expr)>
pub fn as_filter_mut(&mut self) -> Option<(&mut Box<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Filter
, otherwise None
sourcepub fn as_filter(&self) -> Option<(&Box<Expr>, &Expr)>
pub fn as_filter(&self) -> Option<(&Box<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Filter
, otherwise None
sourcepub fn into_filter(self) -> Result<(Box<Expr>, Expr), Self>
pub fn into_filter(self) -> Result<(Box<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Filter
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_aggregate_mut(&mut self) -> Option<(&mut Vec<Expr>, &mut Expr)>
pub fn as_aggregate_mut(&mut self) -> Option<(&mut Vec<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Aggregate
, otherwise None
sourcepub fn as_aggregate(&self) -> Option<(&Vec<Expr>, &Expr)>
pub fn as_aggregate(&self) -> Option<(&Vec<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Aggregate
, otherwise None
sourcepub fn into_aggregate(self) -> Result<(Vec<Expr>, Expr), Self>
pub fn into_aggregate(self) -> Result<(Vec<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Aggregate
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_sort_mut(&mut self) -> Option<(&mut Vec<ColumnSort<Expr>>, &mut Expr)>
pub fn as_sort_mut(&mut self) -> Option<(&mut Vec<ColumnSort<Expr>>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Sort
, otherwise None
sourcepub fn as_sort(&self) -> Option<(&Vec<ColumnSort<Expr>>, &Expr)>
pub fn as_sort(&self) -> Option<(&Vec<ColumnSort<Expr>>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Sort
, otherwise None
sourcepub fn into_sort(self) -> Result<(Vec<ColumnSort<Expr>>, Expr), Self>
pub fn into_sort(self) -> Result<(Vec<ColumnSort<Expr>>, Expr), Self>
Returns the inner fields if this is a TransformKind::Sort
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_take_mut(&mut self) -> Option<(&mut Range, &mut Expr)>
pub fn as_take_mut(&mut self) -> Option<(&mut Range, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Take
, otherwise None
sourcepub fn as_take(&self) -> Option<(&Range, &Expr)>
pub fn as_take(&self) -> Option<(&Range, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Take
, otherwise None
sourcepub fn into_take(self) -> Result<(Range, Expr), Self>
pub fn into_take(self) -> Result<(Range, Expr), Self>
Returns the inner fields if this is a TransformKind::Take
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_join_mut(
&mut self
) -> Option<(&mut JoinSide, &mut Box<Expr>, &mut Box<Expr>, &mut Expr)>
pub fn as_join_mut(
&mut self
) -> Option<(&mut JoinSide, &mut Box<Expr>, &mut Box<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Join
, otherwise None
sourcepub fn as_join(&self) -> Option<(&JoinSide, &Box<Expr>, &Box<Expr>, &Expr)>
pub fn as_join(&self) -> Option<(&JoinSide, &Box<Expr>, &Box<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Join
, otherwise None
sourcepub fn into_join(self) -> Result<(JoinSide, Box<Expr>, Box<Expr>, Expr), Self>
pub fn into_join(self) -> Result<(JoinSide, Box<Expr>, Box<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Join
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_group_mut(
&mut self
) -> Option<(&mut Vec<Expr>, &mut Box<Expr>, &mut Expr)>
pub fn as_group_mut(
&mut self
) -> Option<(&mut Vec<Expr>, &mut Box<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Group
, otherwise None
sourcepub fn as_group(&self) -> Option<(&Vec<Expr>, &Box<Expr>, &Expr)>
pub fn as_group(&self) -> Option<(&Vec<Expr>, &Box<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Group
, otherwise None
sourcepub fn into_group(self) -> Result<(Vec<Expr>, Box<Expr>, Expr), Self>
pub fn into_group(self) -> Result<(Vec<Expr>, Box<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Group
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_window_mut(
&mut self
) -> Option<(&mut WindowKind, &mut Range, &mut Box<Expr>, &mut Expr)>
pub fn as_window_mut(
&mut self
) -> Option<(&mut WindowKind, &mut Range, &mut Box<Expr>, &mut Expr)>
Optionally returns mutable references to the inner fields if this is a TransformKind::Window
, otherwise None
sourcepub fn as_window(&self) -> Option<(&WindowKind, &Range, &Box<Expr>, &Expr)>
pub fn as_window(&self) -> Option<(&WindowKind, &Range, &Box<Expr>, &Expr)>
Optionally returns references to the inner fields if this is a TransformKind::Window
, otherwise None
sourcepub fn into_window(self) -> Result<(WindowKind, Range, Box<Expr>, Expr), Self>
pub fn into_window(self) -> Result<(WindowKind, Range, Box<Expr>, Expr), Self>
Returns the inner fields if this is a TransformKind::Window
, otherwise returns back the enum in the Err
case of the result
source§impl TransformKind
impl TransformKind
pub fn tbl_arg_mut(&mut self) -> Option<&mut Expr>
Trait Implementations§
source§impl AsRef<str> for TransformKind
impl AsRef<str> for TransformKind
source§impl Clone for TransformKind
impl Clone for TransformKind
source§fn clone(&self) -> TransformKind
fn clone(&self) -> TransformKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TransformKind
impl Debug for TransformKind
source§impl<'de> Deserialize<'de> for TransformKind
impl<'de> Deserialize<'de> for TransformKind
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<TransformKind> for Error
impl From<TransformKind> for Error
source§fn from(kind: TransformKind) -> Self
fn from(kind: TransformKind) -> Self
source§impl From<TransformKind> for TransformCall
impl From<TransformKind> for TransformCall
source§fn from(kind: TransformKind) -> Self
fn from(kind: TransformKind) -> Self
source§impl PartialEq<TransformKind> for TransformKind
impl PartialEq<TransformKind> for TransformKind
source§fn eq(&self, other: &TransformKind) -> bool
fn eq(&self, other: &TransformKind) -> bool
source§impl Serialize for TransformKind
impl Serialize for TransformKind
impl StructuralPartialEq for TransformKind
Auto Trait Implementations§
impl RefUnwindSafe for TransformKind
impl Send for TransformKind
impl Sync for TransformKind
impl Unpin for TransformKind
impl UnwindSafe for TransformKind
Blanket Implementations§
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>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more