Skip to content

Releases: networkteam/construct

Make JSON builders immutable (breaking)

02 Dec 18:31

Choose a tag to compare

Breaking changes

  • JsonBuildObject is now immutable and again a var instead 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 json package: JsonBuildArray and ExpIfNotNull
  • Added a complete example with Squirrel / pgx showing many features

Add JSON serialization for writes

20 Nov 08:27

Choose a tag to compare

  • Complex types can now easily be embedded as JSON (e.g. jsonb column in PostgreSQL) by adding the json option to the write_col struct tag

Breaking: Generate function for default select JSON

08 Oct 08:24

Choose a tag to compare

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

06 Oct 14:44

Choose a tag to compare

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)

05 Oct 08:01

Choose a tag to compare

v0.1.0

Add readme, fix format