Updated
On this page
Package seed generates type-aware test data for schema tables, honoring FK order, semantic types, and CHECK/UNIQUE constraints across all PG types.
#internal/seed
#internal/seed
#SeedConfig
go
type SeedConfig structSeedConfig holds per-table seed configuration.
#Generate
go
func Generate(schema *model.Schema, rowsPerTable int, rng *rand.Rand, cfg *SeedConfig) (string, diagnostic.Diagnostics)Generate produces INSERT statements with type-aware test data for all tables in the schema. Tables are processed in TableOrder() (topological) order so that foreign key references resolve correctly. Tables in FK cycles use a two-pass approach: NULLs first, then UPDATEs.