Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
This is a shameless plug but :p , you can use the underlying functions of https://github.com/ShiftLeftSecurity/gaum to do that (without need to use the whole library) it uses reflection to load results into a passwed slice of recipient objects and graciously ignores columns for which there is no correspondence. It accepts pgx and regular postgres conns
There's https://github.com/kyleconroy/sqlc which might fit your needs.
Yes, you wrap Rows.Columns in a helper the same way MapScan does: https://github.com/jmoiron/sqlx/blob/master/sqlx.go#L838