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

Function decode_key

nodedb-array/src/query/elementwise.rs:128–137  ·  view source on GitHub ↗
(k: &[CoordKey])

Source from the content-addressed store, hash-verified

126}
127
128fn decode_key(k: &[CoordKey]) -> Vec<CoordValue> {
129 k.iter()
130 .map(|v| match v {
131 CoordKey::I(x) => CoordValue::Int64(*x),
132 CoordKey::Ts(x) => CoordValue::TimestampMs(*x),
133 CoordKey::F(b) => CoordValue::Float64(f64::from_bits(*b)),
134 CoordKey::S(s) => CoordValue::String(s.clone()),
135 })
136 .collect()
137}
138
139fn index_rows(tile: &SparseTile) -> BTreeMap<Vec<CoordKey>, Vec<CellValue>> {
140 let mut out = BTreeMap::new();

Callers 1

elementwiseFunction · 0.85

Calls 3

collectMethod · 0.80
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected