remove unused field of rows
This commit is contained in:
parent
382b85d765
commit
2b462f7180
4
rows.go
4
rows.go
|
@ -20,7 +20,6 @@ type Rows struct {
|
||||||
stmt *core.Stmt
|
stmt *core.Stmt
|
||||||
rows *core.Rows
|
rows *core.Rows
|
||||||
fields []string
|
fields []string
|
||||||
fieldsCount int
|
|
||||||
beanType reflect.Type
|
beanType reflect.Type
|
||||||
lastError error
|
lastError error
|
||||||
}
|
}
|
||||||
|
@ -82,7 +81,6 @@ func newRows(session *Session, bean interface{}) (*Rows, error) {
|
||||||
rows.Close()
|
rows.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
rows.fieldsCount = len(rows.fields)
|
|
||||||
|
|
||||||
return rows, nil
|
return rows, nil
|
||||||
}
|
}
|
||||||
|
@ -114,7 +112,7 @@ func (rows *Rows) Scan(bean interface{}) error {
|
||||||
return fmt.Errorf("scan arg is incompatible type to [%v]", rows.beanType)
|
return fmt.Errorf("scan arg is incompatible type to [%v]", rows.beanType)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := rows.session.row2Bean(rows.rows, rows.fields, rows.fieldsCount, bean)
|
_, err := rows.session.row2Bean(rows.rows, rows.fields, len(rows.fields), bean)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue