pgdesign v0.26.0 /pgdesign codegen
On this page

Reference for the pgdesign codegen command — usage, flags, arguments, and examples for the codegen subcommand of the pgdesign CLI.

#pgdesign codegen

Generate type-safe application code from schema definitions

Effect: mutating

#Flags

Flags
NameShortTypeDefaultEnvDescription
--langstrTarget programming language for the generated code
--modestrvalidatorsCode generation mode determining what code to produce
--outputstrWrite output to a file at this path instead of stdout
--split-modestrHow to split multi-file Python DDL output: 'faceted' writes one file per object kind, 'self-contained' emits a single importable module
--groupslist[str]Restrict generation to tables in these schema groups (matches build's per-output group filtering)
--sourcelist[str]Restrict generation to tables from these source file basenames (matches build's per-output source filtering)
--checkboolVerify generated code on disk is up to date without writing anything; requires --output, exits 1 on any missing, stale, or orphan file

#Arguments

Arguments
NameRequiredDescription
pathyesPath to TOML schema file(s) or directory containing them
Search