pgdesign v0.26.0 /internal/discover
On this page

Package discover provides automatic functional dependency discovery from live PostgreSQL data using the TANE algorithm (Huhtala et al., 1999).

#internal/discover

#internal/discover

Package discover provides automatic functional dependency discovery from live PostgreSQL data using the TANE algorithm (Huhtala et al., 1999).

#Options

Go go
type Options struct

Options controls FD discovery behavior.

#Discover

Go go
func Discover(conn *pgx.Conn, schemaName, tableName string, opts Options) ([]fd.FuncDep, []diagnostic.Diagnostic, error)

Discover connects to a PostgreSQL database, samples rows from the given table, and runs the TANE algorithm to find functional dependencies that hold in the sample. Discovered FDs are empirical (data-based), not semantic declarations.

Search