| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-05-28 | 5.3 kB | |
| v0.45.0 source code.tar.gz | 2026-05-28 | 708.0 kB | |
| v0.45.0 source code.zip | 2026-05-28 | 926.8 kB | |
| Totals: 3 Items | 1.6 MB | 0 | |
Added
- Added
Schema()method to dialectViewtypes (PostgreSQL, SQLite). (thanks @atzedus) - Added
ColumnsExpr()method onpsql.Viewfor parity with MySQL and SQLite views. (thanks @atzedus) - Added
um.SetExpr/im.SetExpr/mm.SetExprfor SET (and PostgreSQL/SQLiteim.SetExprforON CONFLICT DO UPDATE SET) when the assignment LHS is a qualified or arbitrary expression — passdialect.Quote(...)or anotherbob.Expression.SetCol/UpdateColremain for a single column name (quoted automatically). (thanks @atzedus)
Changed
- BREAKING:
psql.F/mysql.F/sqlite.Fanddialect.NewFunctionnow takename any(wasstring). The name is rendered withbob.Express; use a string for a literal function name ordialect.Quote("schema", "fn")for qualified names. (thanks @atzedus) - BREAKING:
mods.Setis now a struct with aCol anyfield instead of a[]stringalias.um.SetCol/im.SetCol/mm.SetCol(and MySQLim.UpdateCol) take astringcolumn name and quote it automatically; useSetExprfor qualified or arbitrary LHS expressions.SetCol(...).To(...)/SetExpr(...).To(...)implementbob.Expressionand can be passed toum.Set/im.Set/mm.Setto group several assignments in one mod (they still work as standalone query mods). (thanks @atzedus) - Godoc on
sm.With,sm.Window,wm.BasedOn(PostgreSQL, MySQL, SQLite) notes that CTE/window names are quoted as SQL identifiers. (thanks @atzedus) - BREAKING: PostgreSQL
sm.ForUpdate,sm.ForNoKeyUpdate,sm.ForShare, andsm.ForKeySharenow taketables ...anyinstead oftables ...string. Passpsql.Quote(...)(or anotherExpression) for each locked relation (#693). (thanks @atzedus) - BREAKING: MySQL
sm.ForUpdateandsm.ForSharenow taketables ...anywith the same semantics as PostgreSQL (mysql.Quote(...)when needed). (thanks @atzedus) - BREAKING:
clause.Lock.Tablesis now[]anyinstead of[]string(used byFOR UPDATE/FOR SHARErendering). (thanks @atzedus) - BREAKING:
View/TableName()now returns the bare table (or view) name asstring. In v0.44.0,Name()returned a dialectExpression(qualified table reference for SQL). That role moved to new methods: NameExpr()— whatName()did in v0.44.0 (on PostgreSQL and SQLite, respectsUseSchemawhen schema was generated empty)NameAsExpr()— whatNameAs()did in v0.44.0 (name plus table alias) Update manual call sites, codegen templates, and generated models:Users.Name()in SQL builders →Users.NameExpr(),Users.NameAs()→Users.NameAsExpr(); useUsers.Name()when you need the unqualified name string. On PostgreSQL and SQLite,Schema()still returns the schema when set.- Codegen templates and
orm.Preloadnow useNameExpr()/NameAsExpr()instead ofName()/NameAs(). (thanks @atzedus)
Fixed
- Fixed SQL identifier quoting in shared clause builders (CTE names/columns, window names,
ON CONFLICT ON CONSTRAINT,WHERE CURRENT OF, partition/index lists, SQLiteINDEXED BY) and PostgreSQLMERGE/SetColscolumn lists, table-function column definitions, and MySQL optimizer-hint table lists. Simple identifier parameters are quoted automatically; passdialect.Quote(...)for qualified names inanyslots (From,OnConflict,FOR UPDATE OF, etc.). (thanks @atzedus) - Fixed PostgreSQL
sm.Fromclearing joins already on theFROMfrom_item (e.g.sm.CrossJoinbeforesm.From) becauseSelectQuery.AppendTableRefreplaced the entire embeddedFROMtable ref. Existing joins are merged into the new primary table ref. (thanks @atzedus) - Fixed
FOR UPDATE/FOR SHAREOFtable lists: passpsql.Quote(...)/mysql.Quote(...)so names with spaces or qualification render correctly (#693). (thanks @atzedus) - Fixed MySQL
sm.From(...).UseIndex/ForceIndex/IgnoreIndex(and*ForJoin/*ForOrderBy/*ForGroupByvariants) not appearing in generated SQL becauseFromChain.Applydid not copyIndexHintsonto the query. (thanks @atzedus) - Fixed generated models using the wrong column qualifier when a table was constructed with a non-empty schema. Codegen previously passed
table.Keyintobuild*ColumnsandpkEQ/pkIN, but dialectView/Tabletypes useschema.tableasAlias()wheneverschemais set at construction. That mismatch produced SQL such as`users`.`id`inWHEREwhileFROMused`myapp`.`users` AS `myapp.users`(columns and primary-key expressions did not match the table alias fromNameAsExpr()). Templates now use atableColumnAliashelper:schema.namewhenschemais set, otherwisetable.Key. (thanks @atzedus) - Fix issue with overwriting unique constraints for tables beloging to other schemas. . (thanks @eaglehuntt and @MD-Mushfiqur123)
New Contributors
- @MD-Mushfiqur123 made their first contribution in https://github.com/stephenafamo/bob/pull/699
- @eaglehuntt made their first contribution in https://github.com/stephenafamo/bob/pull/699
Full Changelog: https://github.com/stephenafamo/bob/compare/v0.44.0...v0.45.0