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

Function aggregation_function_signatures

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

Source from the content-addressed store, hash-verified

48}
49
50pub fn aggregation_function_signatures() -> HashMap<&'static str, Signature> {
51 let mut map: HashMap<&'static str, Signature> = HashMap::new();
52 map.insert(
53 "max",
54 Signature {
55 parameters: vec![Box::new(VariantType {
56 variants: vec![
57 Box::new(IntType),
58 Box::new(FloatType),
59 Box::new(TextType),
60 Box::new(DateType),
61 Box::new(TimeType),
62 Box::new(DateTimeType),
63 ],
64 })],
65 return_type: Box::new(DynamicType {
66 function: first_element_type,
67 }),
68 },
69 );
70 map.insert(
71 "min",
72 Signature {
73 parameters: vec![Box::new(VariantType {
74 variants: vec![
75 Box::new(IntType),
76 Box::new(FloatType),
77 Box::new(TextType),
78 Box::new(DateType),
79 Box::new(TimeType),
80 Box::new(DateTimeType),
81 ],
82 })],
83 return_type: Box::new(DynamicType {
84 function: first_element_type,
85 }),
86 },
87 );
88 map.insert(
89 "sum",
90 Signature {
91 parameters: vec![Box::new(IntType)],
92 return_type: Box::new(IntType),
93 },
94 );
95 map.insert(
96 "avg",
97 Signature {
98 parameters: vec![Box::new(IntType)],
99 return_type: Box::new(IntType),
100 },
101 );
102 map.insert(
103 "count",
104 Signature {
105 parameters: vec![Box::new(OptionType {
106 base: Some(Box::new(AnyType)),
107 })],

Callers 1

create_gitql_environmentFunction · 0.85

Calls 2

array_of_typeFunction · 0.85
first_element_typeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…