pgdesign v0.26.0 /internal/seed
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 go
type SeedConfig struct

SeedConfig holds per-table seed configuration.

#Generate

Go 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.

Search