Skip to main content

exp

Function exp 

Source
pub fn exp<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Double, E::Nullable, E::Aggregate, E::Sources>
where V: SQLParam + 'a, V::DialectMarker: MathExt, E: Expr<'a, V>, E::SQLType: Numeric,
Expand description

e raised to the argument (EXP).

The argument must be numeric. The result is the dialect’s double type and keeps the argument’s nullability. On SQLite this needs the math feature.

§Examples

assert_eq!(
    exp(users.score).sql(),
    r#"CAST (EXP ("users"."score") AS DOUBLE PRECISION)"#
);