QRM returns sql.ErrNoRows when scanning into struct destination and query result set is empty.
This commit is contained in:
parent
3544977d7f
commit
f9efee77ff
7 changed files with 103 additions and 90 deletions
|
|
@ -33,14 +33,9 @@ func getScanner(value reflect.Value) sql.Scanner {
|
|||
|
||||
func getSliceElemType(slicePtrValue reflect.Value) reflect.Type {
|
||||
sliceTypePtr := slicePtrValue.Type()
|
||||
elemType := indirectType(sliceTypePtr).Elem()
|
||||
|
||||
elemType := sliceTypePtr.Elem().Elem()
|
||||
|
||||
if elemType.Kind() == reflect.Ptr {
|
||||
return elemType.Elem()
|
||||
}
|
||||
|
||||
return elemType
|
||||
return indirectType(elemType)
|
||||
}
|
||||
|
||||
func getSliceElemPtrAt(slicePtrValue reflect.Value, index int) reflect.Value {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue