fn aliased_cond(self, alias: Option<Alias>) -> ConditionTree<'static> {
        match self {
            Filter::And(mut filters) => match filters.len() {
                n if n == 0 => ConditionTree::NoCondition,
                n if n == 1 => filters.pop().unwrap().aliased_cond(alias),
                _ => {
                    let exprs = filters
                        .into_iter()
                        .map(|f| f.aliased_cond(alias))
                        .map(Expression::from)
                        .collect();

                    ConditionTree::And(exprs)
                }
            },
            Filter::Or(mut filters) => match filters.len() {
                n if n == 0 => ConditionTree::NegativeCondition,
                n if n == 1 => filters.pop().unwrap().aliased_cond(alias),
                _ => {
                    let exprs = filters
                        .into_iter()
                        .map(|f| f.aliased_cond(alias))
                        .map(Expression::from)
                        .collect();

                    ConditionTree::Or(exprs)
                }
            },
            Filter::Not(mut filters) => match filters.len() {
                n if n == 0 => ConditionTree::NoCondition,
                n if n == 1 => filters.pop().unwrap().aliased_cond(alias).not(),
                _ => {
                    let exprs = filters
                        .into_iter()
                        .map(|f| f.aliased_cond(alias).not())
                        .map(Expression::from)
                        .collect();

                    ConditionTree::And(exprs)
                }
            },
            Filter::Scalar(filter) => filter.aliased_cond(alias),
            Filter::OneRelationIsNull(filter) => filter.aliased_cond(alias),
            Filter::Relation(filter) => filter.aliased_cond(alias),
            Filter::BoolFilter(b) => {
                if b {
                    ConditionTree::NoCondition
                } else {
                    ConditionTree::NegativeCondition
                }
            }
            Filter::Aggregation(filter) => filter.aliased_cond(alias),
            Filter::Empty => ConditionTree::NoCondition,
            Filter::ScalarList(filter) => filter.aliased_cond(alias),
        }
    }
/// Conversion from a `Filter` to a query condition tree. Aliased when in a nested `SELECT`.
Conversion from a `Filter` to a query condition tree. Aliased when in a nested `SELECT`.
Conversion from a ` Filter ` to a query condition tree . Aliased when in a nested ` SELECT ` .
fn aliased_cond(self, alias: Option<Alias>) -> ConditionTree<'static> {
        match self {
            Filter::And(mut filters) => match filters.len() {
                n if n == 0 => ConditionTree::NoCondition,
                n if n == 1 => filters.pop().unwrap().aliased_cond(alias),
                _ => {
                    let exprs = filters
                        .into_iter()
                        .map(|f| f.aliased_cond(alias))
                        .map(Expression::from)
                        .collect();
                    ConditionTree::And(exprs)
                }
            },
            Filter::Or(mut filters) => match filters.len() {
                n if n == 0 => ConditionTree::NegativeCondition,
                n if n == 1 => filters.pop().unwrap().aliased_cond(alias),
                _ => {
                    let exprs = filters
                        .into_iter()
                        .map(|f| f.aliased_cond(alias))
                        .map(Expression::from)
                        .collect();
                    ConditionTree::Or(exprs)
                }
            },
            Filter::Not(mut filters) => match filters.len() {
                n if n == 0 => ConditionTree::NoCondition,
                n if n == 1 => filters.pop().unwrap().aliased_cond(alias).not(),
                _ => {
                    let exprs = filters
                        .into_iter()
                        .map(|f| f.aliased_cond(alias).not())
                        .map(Expression::from)
                        .collect();
                    ConditionTree::And(exprs)
                }
            },
            Filter::Scalar(filter) => filter.aliased_cond(alias),
            Filter::OneRelationIsNull(filter) => filter.aliased_cond(alias),
            Filter::Relation(filter) => filter.aliased_cond(alias),
            Filter::BoolFilter(b) => {
                if b {
                    ConditionTree::NoCondition
                } else {
                    ConditionTree::NegativeCondition
                }
            }
            Filter::Aggregation(filter) => filter.aliased_cond(alias),
            Filter::Empty => ConditionTree::NoCondition,
            Filter::ScalarList(filter) => filter.aliased_cond(alias),
        }
    }
fn aliased_cond ( self , alias : Option < Alias > ) -> ConditionTree < ' static > { match self { Filter :: And ( mut filters ) => match filters . len ( ) { n if n == 0 => ConditionTree :: NoCondition , n if n == 1 => filters . pop ( ) . unwrap ( ) . aliased_cond ( alias ) , _ => { let exprs = filters . into_iter ( ) . map ( | f | f . aliased_cond ( alias ) ) . map ( Expression :: from ) . collect ( ) ; ConditionTree :: And ( exprs ) } } , Filter :: Or ( mut filters ) => match filters . len ( ) { n if n == 0 => ConditionTree :: NegativeCondition , n if n == 1 => filters . pop ( ) . unwrap ( ) . aliased_cond ( alias ) , _ => { let exprs = filters . into_iter ( ) . map ( | f | f . aliased_cond ( alias ) ) . map ( Expression :: from ) . collect ( ) ; ConditionTree :: Or ( exprs ) } } , Filter :: Not ( mut filters ) => match filters . len ( ) { n if n == 0 => ConditionTree :: NoCondition , n if n == 1 => filters . pop ( ) . unwrap ( ) . aliased_cond ( alias ) . not ( ) , _ => { let exprs = filters . into_iter ( ) . map ( | f | f . aliased_cond ( alias ) . not ( ) ) . map ( Expression :: from ) . collect ( ) ; ConditionTree :: And ( exprs ) } } , Filter :: Scalar ( filter ) => filter . aliased_cond ( alias ) , Filter :: OneRelationIsNull ( filter ) => filter . aliased_cond ( alias ) , Filter :: Relation ( filter ) => filter . aliased_cond ( alias ) , Filter :: BoolFilter ( b ) => { if b { ConditionTree :: NoCondition } else { ConditionTree :: NegativeCondition } } Filter :: Aggregation ( filter ) => filter . aliased_cond ( alias ) , Filter :: Empty => ConditionTree :: NoCondition , Filter :: ScalarList ( filter ) => filter . aliased_cond ( alias ) , } }
Conversion from a `Filter` to a query condition tree.
Conversion from a ` Filter ` to a query condition tree .
self
alias
Option<Alias>
self
alias
Option<Alias>