dialect/sql/sqlgraph: consistent scan names

This commit is contained in:
Ariel Mashraki
2019-12-22 20:12:00 +02:00
parent 6f9dade32c
commit c09028f58b
28 changed files with 32 additions and 32 deletions

View File

@@ -369,8 +369,8 @@ type (
Fields FieldMut
Predicate func(*sql.Selector)
ScanTypes []interface{}
Assign func(...interface{}) error
ScanValues []interface{}
Assign func(...interface{}) error
}
)
@@ -672,10 +672,10 @@ func (u *updater) scan(rows *sql.Rows) error {
if !rows.Next() {
return fmt.Errorf("record with id %v not found in table %s", u.Node.ID.Value, u.Node.Table)
}
if err := rows.Scan(u.ScanTypes...); err != nil {
if err := rows.Scan(u.ScanValues...); err != nil {
return fmt.Errorf("failed scanning rows: %v", err)
}
return u.Assign(u.ScanTypes...)
return u.Assign(u.ScanValues...)
}
type creator struct {