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

Method query_range

nodedb/src/engine/timeseries/o3_buffer.rs:56–62  ·  view source on GitHub ↗

Query: find all rows in this buffer that fall within a time range. Returns rows matching the range, sorted by timestamp.

(&mut self, min_ts: i64, max_ts: i64)

Source from the content-addressed store, hash-verified

54 ///
55 /// Returns rows matching the range, sorted by timestamp.
56 pub fn query_range(&mut self, min_ts: i64, max_ts: i64) -> Vec<&O3Row> {
57 self.ensure_sorted();
58 self.rows
59 .iter()
60 .filter(|r| r.timestamp_ms >= min_ts && r.timestamp_ms <= max_ts)
61 .collect()
62 }
63
64 /// Drain all rows targeting a specific partition (for merge).
65 ///

Callers 3

insert_and_queryFunction · 0.80
empty_queryFunction · 0.80

Calls 3

ensure_sortedMethod · 0.80
collectMethod · 0.80
iterMethod · 0.45

Tested by 3

insert_and_queryFunction · 0.64
empty_queryFunction · 0.64