Skip to content

v0.32.0

Choose a tag to compare

@stephenafamo stephenafamo released this 24 Apr 20:26
· 767 commits to main since this release

Added

  • Added templates for query generation.
  • Added clause.OrderBy.ClearOrderBy()
  • Added expr.ToArgs and expr.ToArgGroup functions to convert slices of a type to args.
  • Add queries key to bobgen-sql and bobgen-sqlite configuration. This is used to specify what folder to search for queries in.
  • Implement the Postgres query parser for SELECT statements.
  • Implement the SQLite query parser for SELECT statements.
  • Add templates for query generation.
  • Add camelCase template function.
  • Add types to the orm package to be used in generated queries. orm.ArgWithPosition, orm.ModExpression, orm.ModExecQuery and orm.ModQuery.
  • Add function orm.ArgsToExpression for use in the generated code.
  • Add String() method to bob.QueryType

Fixed

  • Update mvdan.cc/gofumpt and give precedence to toolchain when calculating the Go version. (thanks @isgj)
  • Add custom comparison support when loading relationships.
  • Fix issue with scanning Postgres inet type.
  • Set Arg and ArgGroup to NULL if there are no values.
  • Do not call BeforeInsertHooks in the insert mod of a view.
  • Fix issue with retrieving inserted rows with the MySQL driver.
  • Add custom comparison for relationship loading. (thanks @kostaspt)

Changed

  • clause.With now takes bob.Expression instead of clause.CTE. This makes it easier to use in generated queries without reconstruction an CTE.
  • clause.OrderBy now takes bob.Expression instead of clause.OrderDef. This makes it easier to use in generated queries without reconstruction an OrderDef.
  • clause.Windows now takes bob.Expression instead of clause.NamedWindow. This makes it easier to use in generated queries without reconstruction the window.
  • clause.For renemaed to clause.Locks and can now take multiple locks.
  • clause.Fetch now takes any instead of an integer.
  • Several changes to the drivers.Query type as support is added for the new query parser.
  • Enum types can now be matched by db_type in bobgen-psql as schema.enum_type. (thanks @abramlab)

Removed

  • Removed clause.OrderBy.SetOrderBy() as it was only being used to clear the set order by clauses.

New Contributors

Full Changelog: v0.31.0...v0.32.0