Skip to main content

IntoExpr

Trait IntoExpr 

Source
pub trait IntoExpr {
    // Required method
    fn into_expr(self) -> Expr;
}
Expand description

Conversion trait for types that can be turned into an Expr.

This trait is implemented for:

  • Expr – returned as-is.
  • &str and String – converted to a column reference via col().
  • Expression – wrapped directly in an Expr.

It is used as a generic bound throughout the builder API so that functions like select(), SelectBuilder::order_by(), and SelectBuilder::group_by() can accept plain strings, Expr values, or raw Expression nodes interchangeably.

Required Methods§

Source

fn into_expr(self) -> Expr

Convert this value into an Expr.

Implementations on Foreign Types§

Source§

impl IntoExpr for &str

Source§

fn into_expr(self) -> Expr

Convert a string slice to a column reference via col().

Source§

impl IntoExpr for String

Source§

fn into_expr(self) -> Expr

Convert an owned string to a column reference via col().

Implementors§