pub fn mod_<'a, V, E1, E2>(
dividend: E1,
divisor: E2,
) -> SQLExpr<'a, V, E1::SQLType, <E1::Nullable as Nullability>::Or<E2::Nullable>, <E1::Aggregate as AggregateKind>::Or<E2::Aggregate>, (E1::Sources, E2::Sources)>Expand description
Remainder of a division, rendered with the % operator.
Both arguments must be numeric. The result has the dividend’s SQL type and
is nullable if either argument is. Named mod_ because mod is a Rust
keyword. expr % n on an SQLExpr renders the same SQL, but types the
result through ArithmeticOutput, which
also marks it nullable on SQLite and MySQL (where x % 0 is NULL).
§Examples
assert_eq!(mod_(users.age, 10).sql(), r#""users"."age" % ?"#);