From 41e52f343af753cb173cbb3ddd092b034151428a Mon Sep 17 00:00:00 2001 From: SmallTianTian Date: Wed, 2 Dec 2020 14:00:16 +0800 Subject: [PATCH] fix: scan more base type and sql.NullXXX (#3813) --- scan.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scan.go b/scan.go index 89849d98..0416489d 100644 --- a/scan.go +++ b/scan.go @@ -84,7 +84,12 @@ func Scan(rows *sql.Rows, db *DB, initialized bool) { scanIntoMap(mapValue, values, columns) *dest = append(*dest, mapValue) } - case *int, *int32, *int64, *uint, *uint32, *uint64, *float32, *float64, *string, *time.Time: + case *int, *int8, *int16, *int32, *int64, + *uint, *uint8, *uint16, *uint32, *uint64, *uintptr, + *float32, *float64, + *bool, *string, *time.Time, + *sql.NullInt32, *sql.NullInt64, *sql.NullFloat64, + *sql.NullBool, *sql.NullString, *sql.NullTime: for initialized || rows.Next() { initialized = false db.RowsAffected++