()
| 489 | |
| 490 | #[test] |
| 491 | fn 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) |
nothing calls this directly
no test coverage detected