Apply the distinct operator depending on the type of distinct
(
distinct: &Distinct,
object: &mut GitQLObject,
hidden_selections: &[String],
)
| 10 | |
| 11 | /// Apply the distinct operator depending on the type of distinct |
| 12 | pub(crate) fn apply_distinct_operator( |
| 13 | distinct: &Distinct, |
| 14 | object: &mut GitQLObject, |
| 15 | hidden_selections: &[String], |
| 16 | ) { |
| 17 | if object.is_empty() { |
| 18 | return; |
| 19 | } |
| 20 | |
| 21 | match distinct { |
| 22 | Distinct::DistinctAll => apply_distinct_all_operation(object, hidden_selections), |
| 23 | Distinct::DistinctOn(fields) => apply_distinct_on_operation(object, fields), |
| 24 | _ => {} |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | /// Apply Distinct all operator that depend on all selected fields in the object |
| 29 | fn apply_distinct_all_operation(object: &mut GitQLObject, hidden_selections: &[String]) { |
no test coverage detected
searching dependent graphs…