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

pub fn count<T: Expression>(t: T) -> Count<T>

Creates a SQL COUNT expression

As with most bare functions, this is not exported by default. You can import it specifically as diesel::expression::count, or glob import diesel::expression::dsl::*

Examples

assert_eq!(Ok(1), animals.select(count(name)).first(&connection));