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

Function statement_bindings_have_no_new_old

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

Source from the content-addressed store, hash-verified

489
490#[test]
491fn statement_bindings_have_no_new_old() {
492 use nodedb::control::planner::procedural::executor::bindings::RowBindings;
493
494 let bindings = RowBindings::statement("orders", "INSERT");
495 let result = bindings.substitute("VALUES (NEW.id, OLD.id, TG_OP, TG_TABLE_NAME)");
496 // NEW.id and OLD.id should remain as-is (no substitution).
497 assert!(result.contains("NEW.id"), "got: {result}");
498 assert!(result.contains("OLD.id"), "got: {result}");
499 assert!(result.contains("'INSERT'"), "got: {result}");
500 assert!(result.contains("'orders'"), "got: {result}");
501}
502
503// ---------------------------------------------------------------------------
504// RowBindings: with_new_row (BEFORE trigger chaining)

Callers

nothing calls this directly

Calls 1

substituteMethod · 0.45

Tested by

no test coverage detected