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

Function binding_compatible

nodedb/src/engine/graph/pattern/executor/mod.rs:285–303  ·  view source on GitHub ↗
(
    binding: &NodeBinding,
    csr: &CsrIndex,
    row: &BindingRow,
    node_id: u32,
)

Source from the content-addressed store, hash-verified

283}
284
285fn binding_compatible(
286 binding: &NodeBinding,
287 csr: &CsrIndex,
288 row: &BindingRow,
289 node_id: u32,
290) -> bool {
291 // Check label constraint.
292 if let Some(ref label) = binding.label
293 && !csr.node_has_label(node_id, label)
294 {
295 return false;
296 }
297 if let Some(ref name) = binding.name
298 && let Some(existing) = row.get(name)
299 {
300 return existing == csr.node_name_raw(node_id);
301 }
302 true
303}
304
305fn bind_node(row: &mut BindingRow, binding: &NodeBinding, csr: &CsrIndex, node_id: u32) {
306 if let Some(ref name) = binding.name {

Callers 1

execute_tripleFunction · 0.85

Calls 3

node_has_labelMethod · 0.80
getMethod · 0.45
node_name_rawMethod · 0.45

Tested by

no test coverage detected