MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / apply_distinct_operator

Function apply_distinct_operator

crates/gitql-engine/src/engine_distinct.rs:12–26  ·  view source on GitHub ↗

Apply the distinct operator depending on the type of distinct

(
    distinct: &Distinct,
    object: &mut GitQLObject,
    hidden_selections: &[String],
)

Source from the content-addressed store, hash-verified

10
11/// Apply the distinct operator depending on the type of distinct
12pub(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
29fn apply_distinct_all_operation(object: &mut GitQLObject, hidden_selections: &[String]) {

Callers 1

evaluate_select_queryFunction · 0.85

Calls 3

is_emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…