trunc

Function trunc 

Source
pub fn trunc<'a, V, E>(expr: E) -> SQLExpr<'a, V, Double, E::Nullable, Scalar>
where V: SQLParam + 'a, E: Expr<'a, V>, E::SQLType: Numeric,
Expand description

TRUNC - truncates a number towards zero.

Returns Double type, preserves nullability.

§Example

use drizzle_core::expr::trunc;

// SELECT TRUNC(users.price)
let truncated = trunc(users.price);