Skip to main content

floor

Function floor 

Source
pub fn floor<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <E::SQLType as RoundingPolicy<V::DialectMarker>>::Output, E::Nullable, E::Aggregate>
where V: SQLParam + 'a, E: Expr<'a, V>, E::SQLType: RoundingPolicy<V::DialectMarker>,
Expand description

FLOOR - rounds a number down to the nearest integer.

Returns a dialect-aware float type, preserves nullability.

ยงExample

use drizzle_core::expr::floor;

// SELECT FLOOR(users.price)
let floored = floor(users.price);