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

Method eval

nodedb-query/src/expr/eval.rs:59–65  ·  view source on GitHub ↗

Evaluate this expression against a document. Column references look up fields in the document. Missing fields return `Null`. Arithmetic on non-numeric values returns `Null`. `OldColumn(..)` resolves to `Null` (use `eval_with_old` for the TRANSITION CHECK path).

(&self, doc: &Value)

Source from the content-addressed store, hash-verified

57 /// `OldColumn(..)` resolves to `Null` (use `eval_with_old` for the
58 /// TRANSITION CHECK path).
59 pub fn eval(&self, doc: &Value) -> Value {
60 self.eval_scope(&RowScope {
61 new_doc: doc,
62 old_doc: None,
63 excluded_doc: None,
64 })
65 }
66
67 /// Evaluate with access to both NEW and OLD documents, used by
68 /// TRANSITION CHECK predicates. `Column(name)` resolves against

Callers 15

eval_arg_for_rowFunction · 0.80
eval_expr_on_jsonFunction · 0.80
matches_valueMethod · 0.80
simple_arithmeticFunction · 0.80
round_functionFunction · 0.80
matches_binaryMethod · 0.80
eval_exprFunction · 0.80
eval_expr_on_docFunction · 0.80
enforce_simple_checkFunction · 0.80
verify_balanceFunction · 0.80
balance_as_ofFunction · 0.80

Calls 1

eval_scopeMethod · 0.80

Tested by 2

simple_arithmeticFunction · 0.64
round_functionFunction · 0.64