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

Function aggregation_functions

crates/gitql-std/src/aggregation.rs:30–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28use crate::meta_types::first_element_type;
29
30pub fn aggregation_functions() -> &'static HashMap<&'static str, AggregationFunction> {
31 static HASHMAP: OnceLock<HashMap<&'static str, AggregationFunction>> = OnceLock::new();
32 HASHMAP.get_or_init(|| {
33 let mut map: HashMap<&'static str, AggregationFunction> = HashMap::new();
34 map.insert("max", aggregation_max);
35 map.insert("min", aggregation_min);
36 map.insert("sum", aggregation_sum);
37 map.insert("avg", aggregation_average);
38 map.insert("count", aggregation_count);
39 map.insert("group_concat", aggregation_group_concat);
40 map.insert("bool_and", aggregation_bool_and);
41 map.insert("bool_or", aggregation_bool_or);
42 map.insert("bit_and", aggregation_bit_and);
43 map.insert("bit_or", aggregation_bit_or);
44 map.insert("bit_xor", aggregation_bit_xor);
45 map.insert("array_agg", aggregation_array_agg);
46 map
47 })
48}
49
50pub fn aggregation_function_signatures() -> HashMap<&'static str, Signature> {
51 let mut map: HashMap<&'static str, Signature> = HashMap::new();

Callers 1

create_gitql_environmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…