You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spanner: code = "InvalidArgument", desc = "failed to decode column 0, error = <the container is not a slice of struct pointers: spanner: code = \"InvalidArgument\", desc = \"type *[]main.Entry cannot be used for decoding ARRAY[STRUCT]\">"
Describe the solution you'd like
I would like that using the following would work:
var output []Entry
if err := row.Columns(&output); err != nil {
fmt.Fprintln(os.Stderr, err)
}
Describe alternatives you've considered
It is possible to use:
var output []*Entry
if err := row.Columns(&output); err != nil {
fmt.Fprintln(os.Stderr, err)
}
And then later copy all the scanned values to a []Entry afterwards, however it does add more unnecessary code and it might allocate more.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently it's possibly to scan into a slice of pointers to structs, however not to a slice of structs:
Fails with:
Describe the solution you'd like
I would like that using the following would work:
Describe alternatives you've considered
It is possible to use:
And then later copy all the scanned values to a
[]Entry
afterwards, however it does add more unnecessary code and it might allocate more.The text was updated successfully, but these errors were encountered: