fn parse_distinct(pair: Pair<'_, Rule>, query: &mut Query) {
    let rule = pair.as_rule();
    // parse attribute and alias.
    let mut inner = pair.into_inner();
    let attr = inner.next().unwrap().as_str();
    let mut distinct = Distinct {
        attr: String::from(attr),
        count: false,
    };
    // Check whether it is distinct count or not.
    if rule == Rule::distinct_count {
        distinct.count = true;
    }
    query.distinct = Some(distinct);
    query.aggregation_exist = true;
}
/// parse_dictinct is used to parse distinct.
parse_dictinct is used to parse distinct.
parse_dictinct is used to parse distinct .
fn parse_distinct(pair: Pair<'_, Rule>, query: &mut Query) {
    let rule = pair.as_rule();
    // parse attribute and alias.
    let mut inner = pair.into_inner();
    let attr = inner.next().unwrap().as_str();
    let mut distinct = Distinct {
        attr: String::from(attr),
        count: false,
    };
    // Check whether it is distinct count or not.
    if rule == Rule::distinct_count {
        distinct.count = true;
    }
    query.distinct = Some(distinct);
    query.aggregation_exist = true;
}
fn parse_distinct ( pair : Pair < ' _ , Rule > , query : & mut Query ) { let rule = pair . as_rule ( ) ; // parse attribute and alias. let mut inner = pair . into_inner ( ) ; let attr = inner . next ( ) . unwrap ( ) . as_str ( ) ; let mut distinct = Distinct { attr : String :: from ( attr ) , count : false , } ; // Check whether it is distinct count or not. if rule == Rule :: distinct_count { distinct . count = true ; } query . distinct = Some ( distinct ) ; query . aggregation_exist = true ; }
parse_dictinct is used to parse distinct.
parse_dictinct is used to parse distinct .
pair
Pair<'_, Rule>
query
&mut Query