[][src]Function diesel::dsl::sum

pub fn sum<ST: Foldable, expr>(
    expr: expr
) -> sum<ST, <expr as AsExpression<Nullable<ST>>>::Expression> where
    expr: AsExpression<Nullable<ST>>, 

Represents a SQL SUM function. This function can only take types which are Foldable.

Examples

assert_eq!(Ok(Some(12i64)), animals.select(sum(legs)).first(&connection));