This commit is contained in:
Mike Schwörer 2022-12-22 15:55:32 +01:00
parent bbb33e9fd6
commit c60afc89bb
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -73,6 +73,10 @@ func ScanSingle[TData any](rows *sqlx.Rows, mode StructScanMode, sec StructScanS
} }
} }
if err := rows.Err(); err != nil {
return *new(TData), err
}
return data, nil return data, nil
} else { } else {
@ -130,5 +134,8 @@ func ScanAll[TData any](rows *sqlx.Rows, mode StructScanMode, sec StructScanSafe
return nil, err return nil, err
} }
} }
if err := rows.Err(); err != nil {
return nil, err
}
return res, nil return res, nil
} }