chore[ci skip]: fix typo

This commit is contained in:
a631807682 2022-05-27 16:02:50 +08:00
parent 9da5e4e5db
commit 0622c0f958
No known key found for this signature in database
GPG Key ID: 137D1D75522168AB

View File

@ -193,7 +193,7 @@ func Scan(rows Rows, db *DB, mode ScanMode) {
// Not Pluck
if sch != nil {
schFiledCount := len(sch.Fields)
schFieldsCount := len(sch.Fields)
for idx, column := range columns {
if field := sch.LookUpField(column); field != nil && field.Readable {
if curIndex, ok := selectedColumnsMap[column]; ok {
@ -201,7 +201,7 @@ func Scan(rows Rows, db *DB, mode ScanMode) {
offset := curIndex + 1
// handle sch inconsistent with database
// like Raw(`...`).Scan
if schFiledCount > offset {
if schFieldsCount > offset {
for fieldIndex, selectField := range sch.Fields[offset:] {
if selectField.DBName == column && selectField.Readable {
selectedColumnsMap[column] = curIndex + fieldIndex + 1