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

Function apply_row_number

nodedb-query/src/window/ranking.rs:11–19  ·  view source on GitHub ↗
(
    rows: &mut [(String, serde_json::Value)],
    indices: &[usize],
    alias: &str,
)

Source from the content-addressed store, hash-verified

9use super::spec::WindowFuncSpec;
10
11pub(super) fn apply_row_number(
12 rows: &mut [(String, serde_json::Value)],
13 indices: &[usize],
14 alias: &str,
15) {
16 for (rank, &i) in indices.iter().enumerate() {
17 set_window_col(&mut rows[i].1, alias, serde_json::json!(rank + 1));
18 }
19}
20
21pub(super) fn apply_rank(
22 rows: &mut [(String, serde_json::Value)],

Callers 1

Calls 2

set_window_colFunction · 0.85
iterMethod · 0.45

Tested by

no test coverage detected