Hey,
I have a question, I am adding jsonb field to a table, but I also want not to change DAO to support that field everywhere. Is it possible not to panic if SELECT returns one field that is missing from a struct?
for example, I have two structs:
type UserWithJson struct {
id int
....
specificUserData jsonb
}
type User struct {
id int
....
}
and table:
CREATE TABLE users(
id int primary key,
....
specific_user_data jsonb
);
When I use User struct in pgxscan.Select, panic happens, is it possible to avoid this except by using UserWithJson?
Hey, I have a question, I am adding jsonb field to a table, but I also want not to change DAO to support that field everywhere. Is it possible not to panic if SELECT returns one field that is missing from a struct?
for example, I have two structs:
and table:
When I use User struct in
pgxscan.Select
,panic
happens, is it possible to avoid this except by using UserWithJson?