Scan to struct does not working
marvinlnnx opened this issue · comments
marvinlnnx commented
I have followed the documentation on go.dev
to see how to implement scan to struct, I followed the same instruction provided in the example it is not working, Here
I am using this version:
"github.com/jackc/pgx/v5"
marvinlnnx commented
Jack Christensen commented
It should be pgx.RowToStructByName[MyBundle]
-- square braces instead of parentheses.
marvinlnnx commented
Thank you it works !
marvinlnnx commented
so should I use pgxpool or pgx only ?
Jack Christensen commented
pgx.RowToStructByName
should work with both pgxpool or pgx.