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

Method eval_with_excluded

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

Evaluate with access to the incoming `EXCLUDED.*` row, used by `INSERT ... ON CONFLICT DO UPDATE`. `Column(name)` resolves against the existing (current) row `doc`; `ExcludedColumn(name)` resolves against `excluded`.

(&self, doc: &Value, excluded: &Value)

Source from the content-addressed store, hash-verified

80 /// against the existing (current) row `doc`; `ExcludedColumn(name)`
81 /// resolves against `excluded`.
82 pub fn eval_with_excluded(&self, doc: &Value, excluded: &Value) -> Value {
83 self.eval_scope(&RowScope {
84 new_doc: doc,
85 old_doc: None,
86 excluded_doc: Some(excluded),
87 })
88 }
89
90 /// Shared walker: one match, one recursion scheme, parameterised by the
91 /// row-scope so `eval` and `eval_with_old` can't drift out of sync.

Callers 1

Calls 1

eval_scopeMethod · 0.80

Tested by

no test coverage detected