v0.26.0
Added
- Add
bobgen-sql
a code generation driver for SQL schema files. Supports PostgreSQL and SQLite. - Add new properties
compare_expr
andcompare_expr_imports
to thetypes
configuration. This is used when comparing primary keys and in testing. - Add
never_required
to relationships configuration. This makes sure the factories does not require the relationship to be set. Useful if you're not using foreign keys. (thanks @jacobmolby) - Add wrapper types for Stringer, TextMarshaler/Unmarshaler, and BinaryMarshaler/Unmarshaler to the
types
configuration. - Make generated enum types implement the
fmt.Stringer
,encoding.TextMarshaler
,encoding.TextUnmarshaler
,encoding.BinaryMarshaler
andencoding.BinaryUnmarshaler
interfaces.
Fixed
- Properly detect reference columns for implicit foreign keys in SQLite.
- Fix panic when generating random values for nullable columns. (thanks @jacobmolby)
- Sort relationships and imports for deterministic generated code. (thanks @jacobmolby)
- Correctly allow
OVER ()
with an empty window definition in PostgreSQL. (thanks @relvacode) - Set
GROUP BY
toNULL
if there are no expressions to group by. - Replace symbols in enum values with their unicode point to make them valid Go identifiers.
- Properly detect implicit foreign keys in SQLite.
- Fix issue with attaching multi-sided relationships. (thanks @jacobmolby)
New Contributors
- @relvacode made their first contribution in #186
- @mmrath made their first contribution in #191
- @AaronCTech made their first contribution in #193
Full Changelog: v0.25.0...v0.26.0