Skip to content

deps(go): bump module github.com/stephenafamo/bob to v0.50.0 - #438

Open
updateclibot[bot] wants to merge 2 commits into
mainfrom
updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3
Open

deps(go): bump module github.com/stephenafamo/bob to v0.50.0#438
updateclibot[bot] wants to merge 2 commits into
mainfrom
updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3

Conversation

@updateclibot

@updateclibot updateclibot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

deps(go): bump module github.com/stephenafamo/bob

clean: go mod tidy

ran shell command "go mod tidy"

deps(go): bump module github.com/stephenafamo/bob to v0.50.0

go.mod updated Module path "github.com/stephenafamo/bob" version from "v0.49.0" to "v0.50.0"

v0.50.0
### Added

- Generated `dberrors` packages now include generic and per-table check-constraint errors for PostgreSQL, matched by constraint name for `pq` and `pgx` drivers. (thanks @keithbro-imx)

### Changed

- PostgreSQL single-column slice relationship loaders (`<Parent>Slice.<Rel>`) and batch counts (`<Parent>Slice.LoadCount<Rel>`) now de-duplicate the key array bound to `= ANY($1)` when the key column can contain duplicates (a non-unique foreign key). The array is only a semi-join filter, so query results are unchanged — a slice of 10,000 parents sharing 50 related rows now binds 50 keys instead of 10,000. Keys that are unique by construction (the parent's own primary key or a uniquely-constrained column) and key types not comparable with `==` keep the previous plain loop, decided at codegen time ([#740](https://github.com/stephenafamo/bob/pull/740)). (thanks @sandonemaki)
- Generated through-relationship loaders (`Load<Rel>`) no longer apply every query mod twice (once against a throwaway query to detect whether the user set columns, then again for real). The default columns are now added by a deferred `bob.ModFunc` during the single real application — the same pattern `View.Query` uses — and the join-key slice is pre-allocated to the parent slice length. Generated SQL is unchanged ([#740](https://github.com/stephenafamo/bob/pull/740)). (thanks @sandonemaki)

### Fixed

- Fixed the PostgreSQL code generator's query parser renumbering each reference to a repeated query parameter (`$N`) as a distinct argument (e.g. `id = $1 OR parent_id = $1` generating `$1`/`$2`), which changed the meaning of the generated query mods. Repeated `$N` references now map to a single generated parameter ([#745](https://github.com/stephenafamo/bob/pull/745)). (thanks @dmakushin)


## New Contributors
* @dmakushin made their first contribution in https://github.com/stephenafamo/bob/pull/745
* @keithbro-imx made their first contribution in https://github.com/stephenafamo/bob/pull/717

**Full Changelog**: https://github.com/stephenafamo/bob/compare/v0.49.0...v0.50.0
v0.49.0
### Added

- Added `bob.NextUniqueInt()` for generating unique SQL alias suffixes ([#719](https://github.com/stephenafamo/bob/issues/719)). (thanks @atzedus)
- Code generation now emits a reflection-free `scan.Mapper` per table (`<table>ScanMapper`) that scans each result column directly into the struct field by index. The mapper is passed to the model constructor, so every query built from a model — `Query()`, relationship loaders, and `Insert`/`Update`/`Delete` with `RETURNING` — scans without the per-row reflection of `scan.StructMapper`. (thanks @sandonemaki)
- Generated `Where` structs now include relationship filters under an `R` field (e.g. `SelectWhere.Pilots.R.HasJets(filters ...bob.Mod[*dialect.SelectQuery])`) that filter rows by the existence of related rows, using a correlated `EXISTS` subquery (semi-join) built from the schema's relationship definitions. The `R` namespace mirrors the model struct and keeps the filters from colliding with column names. Unlike filtering through `SelectJoins`, this does not multiply parent rows, so `DISTINCT` is not needed and `Count()`/`LIMIT`-based pagination stay correct ([#722](https://github.com/stephenafamo/bob/pull/722)). (thanks @sandonemaki)

### Changed

- `NewViewx` and `NewTablex` in the `psql`, `mysql` and `sqlite` dialects now take a `scan.Mapper[T]` argument used for all queries built from the view/table. Pass `nil` to keep the previous reflection-based `scan.StructMapper` behaviour. `NewView`/`NewTable` are unchanged. (thanks @sandonemaki)
- JOIN a DISTINCT unnest(...) for composite-key relationship loaders & counts on PostgreSQL. (thanks @sandonemaki)

### Fixed

- Fixed an unused type import (e.g. `github.com/google/uuid`) in generated models when the type is only referenced through optional wrapper expressions, such as m2m relationship helpers for a join table with a `uuid` column ([#730](https://github.com/stephenafamo/bob/issues/730)).
- Fixed the counts plugin's generated `C` field reusing the `relation_tag` struct tag, which collided with the relations `R` field and caused `encoding/json` to drop both fields when a real tag name was configured. The `C` field now uses a dedicated `relation_tag_count` config option (default `"-"`). (thanks @jacobmolby)
- Fixed generated join alias suffixes using `randInt()`, which could produce negative values when `maphash.Hash.Sum64()` overflowed `int64` ([#719](https://github.com/stephenafamo/bob/issues/719)). Generated join mods now use `bob.NextUniqueInt()` instead. (thanks @atzedus)
- Fixed `orm.Query.Clone()` dropping the `Scanner`, which made `All`/`One`/`Cursor`/`Each` on a cloned query panic with a nil pointer dereference. (thanks @sandonemaki)
- Fixed column_order on `*` selectors in sql queries in postgres

## New Contributors
* @Leonard013 made their first contribution in https://github.com/stephenafamo/bob/pull/734

**Full Changelog**: https://github.com/stephenafamo/bob/compare/v0.48.0...v0.49.0
GitHub Action workflow link
Updatecli logo

Created automatically by Updatecli

Options:

Most of Updatecli configuration is done via its manifest(s).

  • If you close this pull request, Updatecli will automatically reopen it, the next time it runs.
  • If you close this pull request and delete the base branch, Updatecli will automatically recreate it, erasing all previous commits made.

Feel free to report any issues at github.com/updatecli/updatecli.
If you find this tool useful, do not hesitate to star our GitHub repository as a sign of appreciation, and/or to tell us directly on our chat!

@updateclibot updateclibot Bot added the dependencies Pull requests that update a dependency file label Aug 12, 2026
@updateclibot
updateclibot Bot force-pushed the updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3 branch 5 times, most recently from 274822b to daeca30 Compare August 14, 2026 08:23
updatecli added 2 commits August 15, 2026 13:24
Made with ❤️️ by updatecli
@updateclibot
updateclibot Bot force-pushed the updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3 branch from daeca30 to 4107a93 Compare August 15, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants