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

Function extract_non_null

nodedb-query/src/msgpack_scan/aggregate_helpers.rs:77–80  ·  view source on GitHub ↗
(doc: &[u8], field: &str, expr: Option<&SqlExpr>)

Source from the content-addressed store, hash-verified

75/// Used by `count(field)` accumulator to count non-null values.
76#[inline]
77pub fn extract_non_null(doc: &[u8], field: &str, expr: Option<&SqlExpr>) -> Option<()> {
78 let v = extract_value(doc, field, expr)?;
79 if v.is_null() { None } else { Some(()) }
80}

Callers 1

feedMethod · 0.85

Calls 2

extract_valueFunction · 0.85
is_nullMethod · 0.45

Tested by

no test coverage detected