Skip to content

Commit

Permalink
feat: set err
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb committed Oct 17, 2024
1 parent 4129c6d commit 92c1b2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions null.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ func convertAssignRows(dest, src any, rows *sql.Rows) error {
switch dv.Kind() {
case reflect.Pointer:
if src == nil {
dv.Set(reflect.Zero(dv.Type()))
return nil
}
dv.Set(reflect.New(dv.Type().Elem()))
Expand Down

0 comments on commit 92c1b2c

Please sign in to comment.