Skip to main content

ceil

Function ceil 

Source
pub fn ceil<'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

CEIL / CEILING - rounds a number up to the nearest integer.

Returns a dialect-aware float type, preserves nullability.

ยงExample

use drizzle_core::expr::ceil;

// SELECT CEIL(users.price)
let ceiling = ceil(users.price);