Enum prqlc::ir::pl::TransformKind

source ·
pub enum TransformKind {
    Derive {
        assigns: Box<Expr>,
    },
    Select {
        assigns: Box<Expr>,
    },
    Filter {
        filter: Box<Expr>,
    },
    Aggregate {
        assigns: Box<Expr>,
    },
    Sort {
        by: Vec<ColumnSort>,
    },
    Take {
        range: Range,
    },
    Join {
        side: JoinSide,
        with: Box<Expr>,
        filter: Box<Expr>,
    },
    Group {
        by: Box<Expr>,
        pipeline: Box<Expr>,
    },
    Window {
        kind: WindowKind,
        range: Range,
        pipeline: Box<Expr>,
    },
    Append(Box<Expr>),
    Loop(Box<Expr>),
}

Variants§

§

Derive

Fields

§assigns: Box<Expr>
§

Select

Fields

§assigns: Box<Expr>
§

Filter

Fields

§filter: Box<Expr>
§

Aggregate

Fields

§assigns: Box<Expr>
§

Sort

Fields

§

Take

Fields

§range: Range
§

Join

Fields

§with: Box<Expr>
§filter: Box<Expr>
§

Group

Fields

§by: Box<Expr>
§pipeline: Box<Expr>
§

Window

Fields

§range: Range
§pipeline: Box<Expr>
§

Append(Box<Expr>)

§

Loop(Box<Expr>)

Implementations§

source§

impl TransformKind

source

pub fn is_derive(&self) -> bool

Returns true if this is a TransformKind::Derive, otherwise false

source

pub fn as_derive_mut(&mut self) -> Option<&mut Box<Expr>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Derive, otherwise None

source

pub fn as_derive(&self) -> Option<&Box<Expr>>

Optionally returns references to the inner fields if this is a TransformKind::Derive, otherwise None

source

pub fn into_derive(self) -> Result<Box<Expr>, Self>

Returns the inner fields if this is a TransformKind::Derive, otherwise returns back the enum in the Err case of the result

source

pub fn is_select(&self) -> bool

Returns true if this is a TransformKind::Select, otherwise false

source

pub fn as_select_mut(&mut self) -> Option<&mut Box<Expr>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Select, otherwise None

source

pub fn as_select(&self) -> Option<&Box<Expr>>

Optionally returns references to the inner fields if this is a TransformKind::Select, otherwise None

source

pub fn into_select(self) -> Result<Box<Expr>, Self>

Returns the inner fields if this is a TransformKind::Select, otherwise returns back the enum in the Err case of the result

source

pub fn is_filter(&self) -> bool

Returns true if this is a TransformKind::Filter, otherwise false

source

pub fn as_filter_mut(&mut self) -> Option<&mut Box<Expr>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Filter, otherwise None

source

pub fn as_filter(&self) -> Option<&Box<Expr>>

Optionally returns references to the inner fields if this is a TransformKind::Filter, otherwise None

source

pub fn into_filter(self) -> Result<Box<Expr>, Self>

Returns the inner fields if this is a TransformKind::Filter, otherwise returns back the enum in the Err case of the result

source

pub fn is_aggregate(&self) -> bool

Returns true if this is a TransformKind::Aggregate, otherwise false

source

pub fn as_aggregate_mut(&mut self) -> Option<&mut Box<Expr>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Aggregate, otherwise None

source

pub fn as_aggregate(&self) -> Option<&Box<Expr>>

Optionally returns references to the inner fields if this is a TransformKind::Aggregate, otherwise None

source

pub fn into_aggregate(self) -> Result<Box<Expr>, Self>

Returns the inner fields if this is a TransformKind::Aggregate, otherwise returns back the enum in the Err case of the result

source

pub fn is_sort(&self) -> bool

Returns true if this is a TransformKind::Sort, otherwise false

source

pub fn as_sort_mut(&mut self) -> Option<&mut Vec<ColumnSort>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Sort, otherwise None

source

pub fn as_sort(&self) -> Option<&Vec<ColumnSort>>

Optionally returns references to the inner fields if this is a TransformKind::Sort, otherwise None

source

pub fn into_sort(self) -> Result<Vec<ColumnSort>, Self>

Returns the inner fields if this is a TransformKind::Sort, otherwise returns back the enum in the Err case of the result

source

pub fn is_take(&self) -> bool

Returns true if this is a TransformKind::Take, otherwise false

source

pub fn as_take_mut(&mut self) -> Option<&mut Range>

Optionally returns mutable references to the inner fields if this is a TransformKind::Take, otherwise None

source

pub fn as_take(&self) -> Option<&Range>

Optionally returns references to the inner fields if this is a TransformKind::Take, otherwise None

source

pub fn into_take(self) -> Result<Range, Self>

Returns the inner fields if this is a TransformKind::Take, otherwise returns back the enum in the Err case of the result

source

pub fn is_join(&self) -> bool

Returns true if this is a TransformKind::Join, otherwise false

source

pub fn as_join_mut( &mut self ) -> Option<(&mut JoinSide, &mut Box<Expr>, &mut Box<Expr>)>

Optionally returns mutable references to the inner fields if this is a TransformKind::Join, otherwise None

source

pub fn as_join(&self) -> Option<(&JoinSide, &Box<Expr>, &Box<Expr>)>

Optionally returns references to the inner fields if this is a TransformKind::Join, otherwise None

source

pub fn into_join(self) -> Result<(JoinSide, Box<Expr>, Box<Expr>), Self>

Returns the inner fields if this is a TransformKind::Join, otherwise returns back the enum in the Err case of the result

source

pub fn is_group(&self) -> bool

Returns true if this is a TransformKind::Group, otherwise false

source

pub fn as_group_mut(&mut self) -> Option<(&mut Box<Expr>, &mut Box<Expr>)>

Optionally returns mutable references to the inner fields if this is a TransformKind::Group, otherwise None

source

pub fn as_group(&self) -> Option<(&Box<Expr>, &Box<Expr>)>

Optionally returns references to the inner fields if this is a TransformKind::Group, otherwise None

source

pub fn into_group(self) -> Result<(Box<Expr>, Box<Expr>), Self>

Returns the inner fields if this is a TransformKind::Group, otherwise returns back the enum in the Err case of the result

source

pub fn is_window(&self) -> bool

Returns true if this is a TransformKind::Window, otherwise false

source

pub fn as_window_mut( &mut self ) -> Option<(&mut WindowKind, &mut Range, &mut Box<Expr>)>

Optionally returns mutable references to the inner fields if this is a TransformKind::Window, otherwise None

source

pub fn as_window(&self) -> Option<(&WindowKind, &Range, &Box<Expr>)>

Optionally returns references to the inner fields if this is a TransformKind::Window, otherwise None

source

pub fn into_window(self) -> Result<(WindowKind, Range, Box<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

pub fn is_append(&self) -> bool

Returns true if this is a TransformKind::Append, otherwise false

source

pub fn as_append_mut(&mut self) -> Option<&mut Box<Expr>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Append, otherwise None

source

pub fn as_append(&self) -> Option<&Box<Expr>>

Optionally returns references to the inner fields if this is a TransformKind::Append, otherwise None

source

pub fn into_append(self) -> Result<Box<Expr>, Self>

Returns the inner fields if this is a TransformKind::Append, otherwise returns back the enum in the Err case of the result

source

pub fn is_loop(&self) -> bool

Returns true if this is a TransformKind::Loop, otherwise false

source

pub fn as_loop_mut(&mut self) -> Option<&mut Box<Expr>>

Optionally returns mutable references to the inner fields if this is a TransformKind::Loop, otherwise None

source

pub fn as_loop(&self) -> Option<&Box<Expr>>

Optionally returns references to the inner fields if this is a TransformKind::Loop, otherwise None

source

pub fn into_loop(self) -> Result<Box<Expr>, Self>

Returns the inner fields if this is a TransformKind::Loop, otherwise returns back the enum in the Err case of the result

Trait Implementations§

source§

impl AsRef<str> for TransformKind

source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for TransformKind

source§

fn clone(&self) -> TransformKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransformKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransformKind

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for TransformKind

source§

fn eq(&self, other: &TransformKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransformKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for TransformKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Chain<T> for T

§

fn len(&self) -> usize

The number of items that this chain link consists of.
§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
§

impl<T> Container<T> for T
where T: Clone,

§

type Iter = Once<T>

An iterator over the items within this container, by value.
§

fn get_iter(&self) -> <T as Container<T>>::Iter

Iterate over the elements of the container (using internal iteration because GATs are unstable).
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> OrderedContainer<T> for T
where T: Clone,