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

pub fn sum<ST, T>(t: T) -> Sum<T> where
    ST: Foldable,
    T: Expression<SqlType = 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));