stephenafamo / bob

SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite
https://bob.stephenafamo.com
MIT License
760 stars 39 forks source link

broken netip.Addr scan support v0.25.1-0.20240516073824-99941dbd5078 #210

Closed gstarikov closed 4 months ago

gstarikov commented 4 months ago

Hi. trying to migrate from v0.22.1 to v0.25.1-0.20240516073824-99941dbd5078 and:

how to reproduce:

  1. take postgres 16.2
  2. create table create table n (addr inet );
  3. and just go run github.com/stephenafamo/bob/gen/bobgen-psql@v0.25.0

and there will be error unsupported Scan

Scan error on column index 0, name "addr": unsupported Scan, storing driver.Value type string into type *netip.Addr

rows, err := models.N.InsertMany(ctx, t.DB, n...)
stephenafamo commented 4 months ago

This should already be fixed in the current main branch and will be in the next release.

Try and confirm if it is now fixed, if it is not, please reopen the issue.

gstarikov commented 4 months ago

factory test issues is fixed, but scan issue still actual. created an updated issue (https://github.com/stephenafamo/bob/issues/211)