Skip to main content

sqrt

Function sqrt 

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

SQRT - returns the square root of a number.

Returns a dialect-aware double type, preserves nullability.

ยงExample

use drizzle_core::expr::sqrt;

// SELECT SQRT(users.area)
let root = sqrt(users.area);