NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules, #1061 by repository stars
Latest stable
v0.50.0
Last release 1 months ago
06 Oct 2026
Ships fairly regularly
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
5 years old
337 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
It is now possible to restore the null type system from `< v0.37.0` by adding `fallback_null: github.com/aarondl/opt/null` to your `bobgen.yaml` confi
It is now possible to restore the null type system from < v0.37.0 by adding fallback_null: github.com/aarondl/opt/null to your bobgen.yaml configuration file.
fallback_null top level configuraiton option. Which can be either database/sql or github.com/aarondl/opt/null.database/sql, it will use sql.Null[T] for nullable types, and if set to github.com/aarondl/opt/null, it will use opt.null.Val[T].database/sql.bobgen-psql.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.37.0...v0.38.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nullable columns are no longer generated as `github.com/aarondl/opt/null.Val[T]`, but as `database/sql.Null[T]`.
github.com/aarondl/opt/null.Val[T], but as database/sql.Null[T].github.com/aarondl/opt/omit.Val[T] but as pointers.Unfortunately, this will require a lot of changes to existing code that depends on the previously generated types. However, I believe this is a better direction as it uses only the standard library.
drivers/pgx package which contains types and functions to use a pgx/v5 connection as a bob.Executor.github.com/ncruces/go-sqlite3. (thanks @ncruces)sql.Null[T].bob.Transaction interface now takes a context.Context argument in the Commit and Rollback methods.BeginTx on the bob.Transaction interface is now changed to Begin and it takes a single context argument.database/sql drivers.PrimaryKeyVals() method is now private.driver_name to driver in code generation configuration.New and NewQueryer functions. Any of bob.NewDB, bob.NewTx or bob.NewConn can be used instead.StdInterface interface as it is unnecessary.orm.Model interface.github.com/aarondl/opt in generated code.
database/sql.Null with instead of github.com/aarondl/opt/null.Val.github.com/aarondl/opt/omit.Val[T].in_generated_package type configuration option. This was limited and could only indicate that the type is in the models package.
Instead the full import path can now be used in the imports configuration option, and if it is in the same package as the generated code, the prefix will be automatically removed.nil args when checking if default or null in mysql table insert query.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.36.1...v0.37.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed issue with generating correct test code for nullable args in SQL queries.
Full Changelog: https://github.com/stephenafamo/bob/compare/v0.36.0...v0.36.1
Loaders are now generated as singular instead of plural. This feels more natural when using them in code.
Loaders are now generated as singular instead of plural. This feels more natural when using them in code.
// Before
models.Preload.Users.Pilots()
models.SelectThenLoad.Users.Pilots()
// After
models.Preload.User.Pilots()
models.SelectThenLoad.User.Pilot()
Full Changelog: https://github.com/stephenafamo/bob/compare/v0.35.1...v0.36.0
Nothing published for this version
Store types.Time as an RFC3339 string in the DB
types.Time as an RFC3339 string in the DBFull Changelog: https://github.com/stephenafamo/bob/compare/v0.35.0...v0.35.1
Remove the deprecated wipe generation option.
SELECT, INSERT, UPDATE and DELETE queries in bobgen-mysql.INSERT, UPDATE and DELETE queries in bobgen-sqlite.LIMIT and OFFSET to the SQLite Update and Delete queries.IndexedBy and NotIndexed mods to the SQLite Delete queries.Transactor and Transaction interfaces.SeparatePackageForTests attribute to generation outputs to indicate if generated tests should have their own package.RandomColumnNotNull mod to factories to generate random values for non-nullable columns without the chance of being null.WithOneRelations mod to factories to include every relation for a factory template.clause.TableRef which merges clause.Table and clause.From since they had overlapping functionality.RunInTx method to bob.DB. This starts a transaction and calls the given function with this transaction.bobgen-sql.Exec test for generated queries that do not return rows.OrderCombined, LimitCombined, OffsetCombined mods to MySQL SELECT queries. These are applied to the result of a UNION, INTERSECT or EXCEPT query.type_limits property to column definitions.limits option to random_expr function for types. This is to pass any column limits to the randomization function (e.g. max_length for strings).pgtypes.Snapshot type for the pg_snapshot and txid_snapshot type in PostgreSQL.Time type to the types package. This is motivated by the fact that the libsql driver does not support the time.Time type properly.orm.Columns. Also added EnableAlias and DisableAlias methods to orm.Columns to control this behavior.PrimaryKey method to {dialect}.Table to get the primary key columns of the table.Changed the INDEXED BY and NOT INDEXED mods for SQLite update queries from TableIndexedBy and TableNotIndexed to IndexedBy and NotIndexed.
Use LIBSQL_TEST_SERVER environment variable to run tests against a libSQL server instead of the hardcoded localhost:8080.
BeginTx now returns a Transaction interface instead of a bob.Tx.
Generated tests that required a database connection no longer create a new connection for each test. Instead it depends on a testDB connection that the user has to provide.
In the generated models, relationships for ModelSlice are now loaded using arrays to reduce the number of parameter in the query.
-- Before
SELECT * FROM pilots WHERE jet_id IN ($1, $2, $3, ...); -- Parameters increase with the number of pilots
-- After
SELECT * FROM pilots WHERE jet_id IN (SELECT unnest(CAST($1 AS integer[])); -- Parameters are always 1
In the generated model code, Preload is now a struct instead of multiple standaalone functions.
It is now used like Preload.User.Pilots(), instead of PreloadUserPilots().
In the generated model code, ThenLoad is now a struct and has been split for each query type.
It is now used like SelectThenLoad.User.Pilots(), instead of ThenLoadUserPilots().
In the generated model code, the Load interfaces no longer include the name of the source model since it is a method on the model.
It now looks like *models.User.LoadPilots instead of *models.User.LoadUserPilots.
Made changes to better support generating code in multiple languages.
Mark queries with ON DUPLICATE KEY UPDATE as unretrievable in MySQL.
Unretrievable INSERT queries using One, All, Cursor now immediately return orm.ErrCannotRetrieveRow instead of executing the query first.
Generated tests are now run when testing drivers.
MEDIUMINT and MEDIUMINT UNSIGNED are now generated as int16 and uint16 respectively. This is because Go doe not support 24 bit integers.
The randomization function for floats, strings, and decimals now respect the limits set in the column definition.
txid_snapshot is now generated as pgtypes.Snapshot instead of pgtypes.TxIDSnapshot.
cidr postgres type is now generated as types.Text[netip.Prefix] instead of types.Text[netip.Addr].
money postgres type is now generated as a string with a custom randomization expression instead of a decimal.
Factory template mods now take a context argument. This allows for more control when using recursive mods.
Removed WithOneRelations mod from factories, now replaced with WithParentsCascading which also includes parents for any parent relationships.
clause.Table and clause.From, and merge into clause.TableRef since they had overlapping functionality.wipe generation option.pgtypes.TxIDSnapshot type. This is now replaced with pgtypes.Snapshot.bobgen-sqlite.bobgen-sqlite.VALUES as mods.Partitions in MySQL delete queries to after the table alias.RETURNING clause.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.34.2...v0.35.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix bug with bobgen-sql parsing of string identifiers in certain cases.
bobgen-sql parsing of string identifiers in certain cases.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.34.1...v0.34.2
bobgen-psql parsing of string identifiers in certain cases.Nothing published for this version
Remove unnecessary limitation to place FETCH WITH TIES before OFFSET.
FETCH WITH TIES before OFFSET.bobgen-psql.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.34.0...v0.34.1
Added support to generate code for UPDATE, and DELETE queries in bobgen-psql.
UPDATE, and DELETE queries in bobgen-psql.dir configuration for bobgen-sql to pattern and it now takes a glob pattern. This allows excluding certain files from being included (e.g. .down.sql files).Full Changelog: https://github.com/stephenafamo/bob/compare/v0.33.1...v0.34.0
Nothing published for this version
When a query returns only one column, instead of returning a struct with one field, it will return the type of the column. This is to make it easier t
Full Changelog: https://github.com/stephenafamo/bob/compare/v0.33.0...v0.33.1
Nothing published for this version
Added support to generate code for INSERT queries in bobgen-psql.
INSERT queries in bobgen-psql.clause.Confict now takes bob.Expression, and the fields are now moved to a clause.ConflictClause struct.models.InsertWhere in generated code since it is not correct.bobgen-psql.bobgen-psql.bobgen-psql.ON CONFLICT clauses.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.32.0...v0.33.0
Nothing published for this version
Added templates for query generation.
clause.OrderBy.ClearOrderBy()expr.ToArgs and expr.ToArgGroup functions to convert slices of a type to args.queries key to bobgen-sql and bobgen-sqlite configuration. This is used to specify what folder to search for queries in.SELECT statements.SELECT statements.camelCase template function.orm package to be used in generated queries. orm.ArgWithPosition, orm.ModExpression, orm.ModExecQuery and orm.ModQuery.orm.ArgsToExpression for use in the generated code.String() method to bob.QueryTypemvdan.cc/gofumpt and give precedence to toolchain when calculating the Go version. (thanks @isgj)Arg and ArgGroup to NULL if there are no values.BeforeInsertHooks in the insert mod of a view.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.drivers.Query type as support is added for the new query parser.db_type in bobgen-psql as schema.enum_type. (thanks @abramlab)clause.OrderBy.SetOrderBy() as it was only being used to clear the set order by clauses.Full Changelog: https://github.com/stephenafamo/bob/compare/v0.31.0...v0.32.0
Nothing published for this version
Nothing published for this version
One column per quarter.