-
Notifications
You must be signed in to change notification settings - Fork 34
Description
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.
Line 309 in a1a302e
var cols []string = d.Columns(false) |
However, later the withKeys
parameter of FieldReferences()
is true
hence fields marked as keys will be included in the returned list.
Line 340 in a1a302e
dest := s.FieldReferences(true) |
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.