Skip to main content

ln

Function ln 

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

LN - returns the natural logarithm of a number.

SQLite and MySQL return NULL outside the logarithm domain. PostgreSQL reports an error for invalid non-NULL input.

ยงExample

use drizzle_core::expr::ln;

// SELECT LN(users.value)
let natural_log = ln(users.value);