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

Function get_field

nodedb-query/src/window/helpers.rs:43–45  ·  view source on GitHub ↗
(doc: &serde_json::Value, field: &str)

Source from the content-addressed store, hash-verified

41}
42
43pub(super) fn get_field(doc: &serde_json::Value, field: &str) -> serde_json::Value {
44 doc.get(field).cloned().unwrap_or(serde_json::Value::Null)
45}
46
47/// Evaluate a `SqlExpr` against a serde_json document, returning a serde_json value.
48pub(super) fn eval_expr_on_json(expr: &SqlExpr, doc: &serde_json::Value) -> serde_json::Value {

Callers 7

running_aggregateFunction · 0.85
per_row_aggregateFunction · 0.85
aggregate_sliceFunction · 0.85
apply_lagFunction · 0.85
apply_leadFunction · 0.85
apply_nth_valueFunction · 0.85
eval_expr_on_jsonFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected