graph

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package graph answers reachability questions over the CALLS edge table using depth-capped, cycle-guarded recursive CTEs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallPaths

func CallPaths(db *sql.DB, from, to int64, maxDepth, limit int) ([][]Node, error)

CallPaths returns up to limit distinct call paths from -> to (each a sequence of nodes), shortest first.

Types

type Node

type Node struct {
	ID    int64
	QName string
	Name  string
	Kind  string
	File  string
	Line  int
	Depth int
}

Node is a symbol reached during traversal.

func Callees

func Callees(db *sql.DB, start int64, maxDepth int) ([]Node, error)

Callees returns symbols transitively called by start, up to maxDepth.

func Callers

func Callers(db *sql.DB, start int64, maxDepth int) ([]Node, error)

Callers returns symbols that transitively call start, up to maxDepth.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL