Skip to main content

alopex_dataframe/expr/
functions.rs

1use crate::expr::expr::Scalar;
2use crate::Expr;
3
4/// Create an expression that refers to a column by name (case-sensitive).
5pub fn col(_name: &str) -> Expr {
6    Expr::Column(_name.to_string())
7}
8
9/// Create a literal expression from a scalar value.
10pub fn lit<T>(value: T) -> Expr
11where
12    T: Into<Scalar>,
13{
14    Expr::Literal(value.into())
15}
16
17/// Create a wildcard expression that expands to all columns in projections.
18pub fn all() -> Expr {
19    Expr::Wildcard
20}