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

Function parse_interval_to_ms

nodedb-sql/src/planner/aggregate.rs:252–256  ·  view source on GitHub ↗

Parse an interval string to milliseconds. Delegates to the canonical `nodedb_types::kv_parsing::parse_interval_to_ms`.

(s: &str)

Source from the content-addressed store, hash-verified

250///
251/// Delegates to the canonical `nodedb_types::kv_parsing::parse_interval_to_ms`.
252fn parse_interval_to_ms(s: &str) -> i64 {
253 nodedb_types::kv_parsing::parse_interval_to_ms(s)
254 .map(|ms| ms as i64)
255 .unwrap_or(0)
256}
257
258/// Convert GROUP BY clause to SqlExpr list.
259pub fn convert_group_by(group_by: &GroupByExpr) -> Result<Vec<SqlExpr>> {

Callers 3

extract_bucket_intervalFunction · 0.70
build_kv_ttlFunction · 0.50
parse_interval_to_microsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected