Expand description
Graph traversal: 1-hop neighbors and BFS via recursive CTEs.
Functions§
- build_
graph - Build a graph snapshot (node summaries + edges) from the database.
- graph_
neighbors - Get 1-hop neighbors from seed IDs. Returns
(neighbor_id, total_weight)sorted by weight DESC. - related_
nodes - BFS traversal from
start_idvia SQL recursive CTE.