Changelog¶
Version history of the db-gen tool. The authoritative copy lives at ../db-gen/CHANGELOG.md.
Unreleased¶
New features¶
- Copy targets — generate language-agnostic bulk-
COPY-into-table code from a table's columns. db-gen emits column metadata and a per-language template produces theCOPY ... FROM STDINcode. See Copy Targets. - Copy-target change detection — staging-table schema changes (added/removed columns, type and nullability changes) are reported by
generateanddatabase-changes, closing the gap where staging-column drift was silent. - Test framework — three-layer suite (pure unit, DB-backed integration, golden-file e2e).
0.6.1¶
Bug fixes¶
- Field-name generation preserves underscores before numbers —
country_iso_2no longer collapses tocountry_iso2. NewnormalizeStrtemplate function uses normalized db column names directly. - Unnamed parameters (
$1,$2) no longer crash routine loading —parameter_nameis coalesced to an empty string.
0.6.0¶
New features¶
- Context Parameter Mapping — inject context params from a UserContext object.
- Additional Generators framework — single-file or per-routine custom outputs.
- Three-tier type mapping —
NullableReturnType,NullableParameterType,OptionalParameterType. - RemoveOrphanedFiles — delete generated files when their database function disappears.
- CleanOutputFolder — clean an additional generator's output folder before generating.
Bug fixes¶
- Per-function type overrides now use global nullable/optional mappings.
- Nullable parameters use
T?(always passed) instead ofOptional<T>. - Fixed double-wrapping of nullable parameters.
- jsonb handling kept inside the DbContext layer.
- Change detection tracks files from all output folders.
0.5.2¶
- Separated
OptionalfromNullable. Optional applies only to parameters with a DEFAULT; both can be overridden separately.
0.5.0¶
Breaking changes¶
Functionsconfig changed from an array to an object keyed by function name.- Removed
IgnoredFunctions— set a function tofalseinFunctionsinstead. - Overloaded functions must declare a unique mapped name.
New features¶
- Per-function mapping overrides (name, value retrieval, per-parameter/column type and nullability, custom mapping function).
4.0.0¶
- New
routinescommand exports routines toRoutinesFile. --UseRoutinesFileflag generates from the file instead of the database.
0.3.x¶
- Local config supports
.localpostfix andlocal./.local.prefixes. BuildInfoavailable in all templates.
0.3.0¶
Breaking changes¶
GeneratedFileCasevalues renamed:snake→snakecase,lcase→camelcase,ucase→pascalcase.- Template functions renamed:
snake→snakeCased,lCamel→camelCased,uCamel→pascalCased.
New features¶
ProcessorsFolderNameandModelsFolderNameconfig (defaultsprocessors/models).Configvariable available in Model, Processor, and DbContext templates.