Skip to main content

ConditionalAggregates

Trait ConditionalAggregates 

Source
pub trait ConditionalAggregates: Dialect {
    // Provided method
    fn aggregate_filter(
        b: &mut Builder<Self>,
        aggregate: &str,
        column: Option<&str>,
        condition: &str,
        alias: &str,
    ) -> Result<String> { ... }
}
Expand description

COUNT(CASE WHEN ... THEN 1 END) and the other conditional aggregates.

Provided Methods§

Source

fn aggregate_filter( b: &mut Builder<Self>, aggregate: &str, column: Option<&str>, condition: &str, alias: &str, ) -> Result<String>

The select expression of aggregate over column (or 1 for counts) where condition holds, with its alias.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§