| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-04-29 | 4.3 kB | |
| v0.43.0 source code.tar.gz | 2026-04-29 | 677.3 kB | |
| v0.43.0 source code.zip | 2026-04-29 | 889.0 kB | |
| Totals: 3 Items | 1.6 MB | 1 | |
Added
- Added PostgreSQL
MERGEstatement support with full syntax including: MERGE INTO ... USING ... ON ...with table aliases andONLYmodifierWHEN MATCHED,WHEN NOT MATCHED,WHEN NOT MATCHED BY SOURCEclausesUPDATE,INSERT,DELETE,DO NOTHINGactions- Support for
AND conditionin WHEN clauses OVERRIDING SYSTEM VALUEandOVERRIDING USER VALUEfor INSERT actionsRETURNINGclause support (PostgreSQL 17+) (thanks @atzedus)- Note: the SQL parser used for sql-to-code generation does not yet support
MERGEstatements - Added
psql.SetVersion,psql.GetVersion, andpsql.VersionAtLeastfunctions for context-based PostgreSQL version management (thanks @atzedus) - Added
Table.Merge()method for ORM-style MERGE operations with automaticRETURNING *for PostgreSQL 17+ (thanks @atzedus) - Added
mmpackage with modifiers for building MERGE queries (mm.Into,mm.Using,mm.WhenMatched,mm.WhenNotMatched,mm.WhenNotMatchedBySource, etc.) (thanks @atzedus) - Added
enum_formatconfiguration option to control enum value identifier formatting. Options:"title_case"(default, e.g.,InProgress) or"screaming_snake_case"(e.g.,IN_PROGRESS). - Added
Unqualified()method to generated column structures that returns columns without table alias/prefix. (thanks @atzedus) - Added
PreloadCountandThenLoadCountto generate code for preloading and then loading counts for relationships. (thanks @jacobmolby) - MySQL support for insert queries executing loaders (e.g.,
InsertThenLoad,InsertThenLoadCount). (thanks @jacobmolby) - Added overwritable hooks that are run before the exec or scanning test of generated queries. This allows seeding data before the test runs.
- Added
bob.Eachfunction to iterate over query results (range-over-func). (thanks @toqueteos) - Added support for the
VALUESstatement in MySQL, PostgreSQL, and SQLite. (thanks @manhrev) - Added MariaDB compatibility check in gen/bobgen-mysql (thanks @dumdev25)
- Added
ALL,SOME,ANYexpressions for MySQL and PostgreSQL dialects. AddedEXISTSexpression for all dialects. (thanks @manhrev) - Added a customizable MySQL and PostgreSQL driver image setting for
bobgen-sql. (thanks @manhrev)
Fixed
- Fix
pgxdriverCommit()returningnilinstead ofpgx.ErrTxClosedwhen the transaction is already closed (e.g., rolled back by context expiry). This prevented silent data loss by correctly propagating the error to the caller. (thanks @wucm667) - Fix self-referencing relationship back-references so generated preload/load helpers no longer create cyclic parent links. (thanks @atzedus)
- Fix collisions for preloader alias generation. Replaced
RandIntwithNextUniqueInt(thanks @atzedus) - Fix an issue where the random function of aliased custom types were not being used in generated query tests.
- Properly recognize placeholders in LIMIT and OFFSET when generating queries for PostgreSQL.
- Throw an error on an empty SET clause during SQL generation rather than sending invalid syntax to database. (thanks @Xaeroxe)
- Fix MySQL
Insert().One()/All()/Cursor()usingSELECT *instead of explicit model columns when re-fetching inserted rows, consistent with PostgreSQL/SQLiteRETURNING. (thanks @tak848)
New Contributors
- @olafal0 made their first contribution in https://github.com/stephenafamo/bob/pull/596
- @toqueteos made their first contribution in https://github.com/stephenafamo/bob/pull/607
- @dumdev25 made their first contribution in https://github.com/stephenafamo/bob/pull/614
- @manhrev made their first contribution in https://github.com/stephenafamo/bob/pull/613
- @Xaeroxe made their first contribution in https://github.com/stephenafamo/bob/pull/615
- @aronsx made their first contribution in https://github.com/stephenafamo/bob/pull/630
- @fisayoafolayan made their first contribution in https://github.com/stephenafamo/bob/pull/644
- @Ocyss made their first contribution in https://github.com/stephenafamo/bob/pull/646
- @wucm667 made their first contribution in https://github.com/stephenafamo/bob/pull/661
Full Changelog: https://github.com/stephenafamo/bob/compare/v0.42.0...v0.43.0