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
It seems that ListWhere() is unable to convert a []Recorder back to its real type and returns an empty base object. Further investigation showed that there is a contradiction within the function on how to handle keys.
The below snippet shows that the includeKeys parameter of Column() is false hence columns that are marked as keys will be omitted from the returned list.
This will currently result in a mismatch between the number of columns and throw an ERROR: sql: expected 19 destination arguments in Scan, not 20 message. Unfortunately, errors returned by rows.Scan(dest...) are ignored hence the function will silently fail and return an empty base object.
The text was updated successfully, but these errors were encountered:
sgabe
added a commit
to sgabe/structable
that referenced
this issue
Aug 16, 2020
It seems that
ListWhere()
is unable to convert a[]Recorder
back to its real type and returns an empty base object. Further investigation showed that there is a contradiction within the function on how to handle keys.The below snippet shows that the
includeKeys
parameter ofColumn()
isfalse
hence columns that are marked as keys will be omitted from the returned list.structable/structable.go
Line 309 in a1a302e
However, later the
withKeys
parameter ofFieldReferences()
istrue
hence fields marked as keys will be included in the returned list.structable/structable.go
Line 340 in a1a302e
This will currently result in a mismatch between the number of columns and throw an
ERROR: sql: expected 19 destination arguments in Scan, not 20
message. Unfortunately, errors returned byrows.Scan(dest...)
are ignored hence the function will silently fail and return an empty base object.The text was updated successfully, but these errors were encountered: