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

Function window_function_signatures

crates/gitql-std/src/window.rs:27–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27pub fn window_function_signatures() -> HashMap<&'static str, Signature> {
28 let mut map: HashMap<&'static str, Signature> = HashMap::new();
29 map.insert(
30 "first_value",
31 Signature {
32 parameters: vec![Box::new(AnyType)],
33 return_type: Box::new(DynamicType {
34 function: first_element_type,
35 }),
36 },
37 );
38
39 map.insert(
40 "nth_value",
41 Signature {
42 parameters: vec![Box::new(AnyType), Box::new(IntType)],
43 return_type: Box::new(DynamicType {
44 function: first_element_type,
45 }),
46 },
47 );
48
49 map.insert(
50 "last_value",
51 Signature {
52 parameters: vec![Box::new(AnyType)],
53 return_type: Box::new(DynamicType {
54 function: first_element_type,
55 }),
56 },
57 );
58
59 map.insert(
60 "row_number",
61 Signature {
62 parameters: vec![],
63 return_type: Box::new(IntType),
64 },
65 );
66 map
67}
68
69pub fn window_first_value(frame: &[Vec<Box<dyn Value>>]) -> Vec<Box<dyn Value>> {
70 let frame_len = frame.len();

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…