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

Function before_delete_bindings_have_old_only

nodedb/tests/trigger_execution.rs:474–484  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

472
473#[test]
474fn before_delete_bindings_have_old_only() {
475 use nodedb::control::planner::procedural::executor::bindings::RowBindings;
476 use std::collections::HashMap;
477
478 let mut old = HashMap::new();
479 old.insert("id".into(), nodedb_types::Value::Integer(42));
480 let bindings = RowBindings::before_delete("users", old);
481 let result = bindings.substitute("VALUES (OLD.id, TG_OP)");
482 assert!(result.contains("42"), "got: {result}");
483 assert!(result.contains("'DELETE'"), "got: {result}");
484}
485
486// ---------------------------------------------------------------------------
487// RowBindings: STATEMENT constructor

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
substituteMethod · 0.45

Tested by

no test coverage detected