MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / col_arg

Function col_arg

nodedb-query/src/window/offset.rs:10–18  ·  view source on GitHub ↗
(spec: &WindowFuncSpec, idx: usize)

Source from the content-addressed store, hash-verified

8use super::spec::WindowFuncSpec;
9
10fn col_arg(spec: &WindowFuncSpec, idx: usize) -> &str {
11 spec.args
12 .get(idx)
13 .and_then(|e| match e {
14 SqlExpr::Column(c) => Some(c.as_str()),
15 _ => None,
16 })
17 .unwrap_or("*")
18}
19
20fn usize_arg(spec: &WindowFuncSpec, idx: usize, default: usize) -> usize {
21 spec.args

Callers 3

apply_lagFunction · 0.85
apply_leadFunction · 0.85
apply_nth_valueFunction · 0.85

Calls 2

getMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected