ITADN
go-pg/pg/Issues

pg: Model(unsupported *int32)

#1849Closedivoras 创建于 2021-03-20
I
ivorascommented
I've upgraded from v8 to v10, and code suddenly stopped working. There's a function which does this: ``` func (db *EquinoxDb) IncSectorVersion(geohash uint64) (v int32, err error) { _, err = db.QueryOne(&v, "UPDATE sector SET version=version+1 WHERE geohash=? RETURNING version", geohash) if err == pg.ErrNoRows { _, err = db.QueryOne(&v, `INSERT INTO sector(geohash) VALUES(?) RETURNING version`, geohash) } return } ``` This has worked before, but now errors out with pg: Model(unsupported *int32). ## Expected Behavior Queries return data in the provided *int32 value. ## Current Behavior `pg: Model(unsupported *int32)` ## Possible Solution Is support for the int32 data type removed? My go.mod says this is on go-pg v10.7.7.
关闭于 2021-03-20 3 条评论