forked from mirror/gorm
fix: scan more base type and sql.NullXXX (#3813)
This commit is contained in:
parent
acedbb8310
commit
41e52f343a
7
scan.go
7
scan.go
|
@ -84,7 +84,12 @@ func Scan(rows *sql.Rows, db *DB, initialized bool) {
|
||||||
scanIntoMap(mapValue, values, columns)
|
scanIntoMap(mapValue, values, columns)
|
||||||
*dest = append(*dest, mapValue)
|
*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() {
|
for initialized || rows.Next() {
|
||||||
initialized = false
|
initialized = false
|
||||||
db.RowsAffected++
|
db.RowsAffected++
|
||||||
|
|
Loading…
Reference in New Issue