Make ScanStruct both backward and forward compatible #1416
recht
started this conversation in
Feature requests
Replies: 1 comment
-
It's actually even worse, because when using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a query like
select * from table
, and I useScanStruct
to map the results to a struct. Now I want to add a new column to the table, so Ialter table add column
, but that then breaks the query becauseScanStruct
fails withmissing destination name "newcolumn" in *struct
.A nicer behavior would be to not fail but just ignore columns that can't be mapped, just like with unmarshalling json. That would make it much easier to roll out changes to tables as it requires less coordination.
Beta Was this translation helpful? Give feedback.
All reactions