Surface errors emitted by `RowsAffected'.

This commit is contained in:
Jay Taylor 2015-07-02 12:06:06 -07:00
parent 27a442b5ec
commit 923ca15b6f
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ func (scope *Scope) Exec() *Scope {
if !scope.HasError() { if !scope.HasError() {
if result, err := scope.SqlDB().Exec(scope.Sql, scope.SqlVars...); scope.Err(err) == nil { if result, err := scope.SqlDB().Exec(scope.Sql, scope.SqlVars...); scope.Err(err) == nil {
if count, err := result.RowsAffected(); err == nil { if count, err := result.RowsAffected(); scope.Err(err) == nil {
scope.db.RowsAffected = count scope.db.RowsAffected = count
} }
} }