Releases: networkteam/construct
Releases · networkteam/construct
Make JSON builders immutable (breaking)
Breaking changes
- JsonBuildObject is now immutable and again a
varinstead of a function (because it is not mutated anymore)- Make sure to update code to always use the return value of any mutating call to the builder
Other changes
- Added more functions to the
jsonpackage:JsonBuildArrayandExpIfNotNull - Added a complete example with Squirrel / pgx showing many features
Add JSON serialization for writes
- Complex types can now easily be embedded as JSON (e.g.
jsonbcolumn in PostgreSQL) by adding thejsonoption to thewrite_colstruct tag
Breaking: Generate function for default select JSON
Construct will now generate a function to get a default JSON object builder for selects since the builder might be mutated.
Generate schema consts and JSON scan func
This release adds two new features to the generator:
- Generate constants for all read columns
- Generate a function to scan a JSON row result into the target type
See README.md for examples.
First version (experimental)
v0.1.0 Add readme, fix format