mirror of
https://github.com/safishamsi/graphify.git
synced 2026-10-17 09:29:27 +00:00
A trigger exists to run a routine, but the create_trigger branch only linked the trigger to its ON table and ignored the EXECUTE FUNCTION/PROCEDURE clause entirely. The routine a trigger fires — its whole reason to exist — was never represented in the graph. Register function/procedure node ids in a routine_nids map (mirroring table_nids) and, in create_trigger, read the object_reference after EXECUTE and emit an `executes` edge to that routine. Resolution is name-based against routines defined in the same file (a trigger's function is declared before it); when the routine is not in this file the edge is skipped rather than guessing a cross-file target or minting a bare-name stub that could never rewire onto a `name()` function node. Add regression tests for the resolved case and the fail-closed case.