The fantastic ORM library for Golang, aims to be developer friendly
Sure. You can do this, but I would honestly recommend to only do this in test code, if at all. Otherwise, you should aim to keep types and by that the according API to interact with your DB schema static and consistent. An easy way to do this would be to use an object relational mapper (ORM) library like gorm.
Database Handling with Golang Gorm (CRUD Handling)
2 projects | dev.to | 27 Dec 2021
Query a pq.StringArray if it contains a match when using GORM
1 project | reddit.com/r/golang | 16 Jun 2021
How to Build REST API using Go Fiber and Gorm ORM
2 projects | dev.to | 1 Jan 2022
What kind of things have you ran with go:generate?
6 projects | reddit.com/r/golang | 16 Dec 2021
CRUD in Go: equivalent of Django REST framework
6 projects | reddit.com/r/golang | 16 Jun 2021