Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@updateclibot
Copy link
Contributor

@updateclibot updateclibot bot commented Jul 28, 2025

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.39.0

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

v0.38.0
## Highlights

**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.**

### Added

- Added the `fallback_null` top level configuraiton option. Which can be either `database/sql` or `github.com/aarondl/opt/null`.  
   This is used to determine how to create null values in the generated code. If set to `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]`.  
   The default value is `database/sql`.

### Fixed

- Correctly build models with nested relationships in the factory.
- Fix a performance issue with code generation in `bobgen-psql`.
- Use the correct alias when generating table columns.
- Fix issue with generating factory code for tables with schema names.



**Full Changelog**: https://github.com/stephenafamo/bob/compare/v0.37.0...v0.38.0
v0.39.0
### Added

- Added the `As` method to `clause.TableRef`, which sets the alias and return a copy of the struct. (thanks @Nitjsefni7)
- Added the `type_system` configuration option to determine how to generate null and optional values in the generated code.
  Possible options: `github.com/aarondl/opt`, `github.com/aarondl/opt/null` or `database/sql`. The default value is `github.com/aarondl/opt`.
- When generating code for queries, The `All` method of the generated query will return a struct with nested fields instead of a flat struct.
  - columns with dots (`.`) are assumed to be a `to-many` nested field.
  - columns with double underscores (`__`) are assumed to be a `to-one` nested field.
- Implement `--prefix` annotation in queries for `bobgen-psql`.
- Add FromExisting<Rel> method to factories to create a template from an existing model. (thanks @dutow)
- Add WithExisting<Rel> to factory mods to attach an existing model as a relationship. (thanks @dutow)
- Added support in psql for combined args (order by, limit etc.) in combined queries and use parens if they are present. (@iwyrkore)
- Added parens for combined queries. (@iwyrkore)
- Match columns using regular expressions in type replacements. This is useful for e.g. matching columns that have a common prefix or suffix. (thanks @abdusco)

### Changed

- `Mod` is now a separate field in `orm.ModQuery` and `orm.ModExecQuery`.
- `Allx` now takes a `Transformer` type parameter to transform the result of the query.
- Updated documentation for readability, added code gen examples. (thanks @singhsays)
- Columns are now matched in a case-insensitive manner in type replacements. (thanks @abdusco)
- Columns can now be matched with as many conditions as needed in type replacements. This removes the previous requirement that boolean fields had to be specified in addition to a string field. (thanks @abdusco)
- Factories now expose a `NewXWithContext` that accepts a context in addition to `NewX` that does not. This provides a cleaner API for the callers, while still allowing the use of context internally. (thanks @abdusco)

### Removed

- Removed the `fallback_null` configuration option. It is now replaced with the `type_system` configuration option.

### Fixed

- Fixed some issues with creating relationships in the factory by avoiding trying to reuse models.
- Fix issues with generating code for queries with duplicate return column names.
- Updated gen table detail queries to use context. (thanks @singhsays)
- Properly detect `bool`, `timestamp` and `timestamptz` types in `bobgen-psql`.
- Fix transformer for single result queries.
- Properly handle indexes where the sorting order can be null.
- Check for nullability when loading relationships.
- Handle table names quoted with backticks in mysql query parser. (thanks @luiscleto)
- Allow matching columns in type replacements by the `autoincr` property as stated in the docs. (thanks @abdusco)
- Handle dashes and spaces in generated enum values properly (thanks @abdusco)
- Check for nullability when loading relationships from Slices (thanks @felipeparaujo)



## New Contributors
* @dutow made their first contribution in https://github.com/stephenafamo/bob/pull/470
* @iwyrkore made their first contribution in https://github.com/stephenafamo/bob/pull/484
* @luiscleto made their first contribution in https://github.com/stephenafamo/bob/pull/493
* @abdusco made their first contribution in https://github.com/stephenafamo/bob/pull/499

**Full Changelog**: https://github.com/stephenafamo/bob/compare/v0.38.0...v0.39.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 Jul 28, 2025
@updateclibot updateclibot bot force-pushed the updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3 branch 3 times, most recently from fabf703 to bfc1eea Compare August 4, 2025 19:07
@updateclibot updateclibot bot force-pushed the updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3 branch from d1a215c to 0a8a92a Compare August 6, 2025 19:13
updatecli and others added 2 commits August 6, 2025 19:13
Made with ❤️️ by updatecli
@olblak olblak enabled auto-merge (squash) August 7, 2025 18:38
@olblak olblak merged commit 4e37c87 into main Aug 7, 2025
5 checks passed
@olblak olblak deleted the updatecli_main_09a6e72fdd63b4ab3dfc150e2d5a5719bc7c55d81cb7c6f15d06b8feea08d3c3 branch August 7, 2025 18:51
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.

2 participants