(db *gorm.DB)
| 5 | ) |
| 6 | |
| 7 | func RawExec(db *gorm.DB) { |
| 8 | if db.Error == nil && !db.DryRun { |
| 9 | result, err := db.Statement.ConnPool.ExecContext(db.Statement.Context, db.Statement.SQL.String(), db.Statement.Vars...) |
| 10 | if err != nil { |
| 11 | db.AddError(err) |
| 12 | return |
| 13 | } |
| 14 | |
| 15 | db.RowsAffected, _ = result.RowsAffected() |
| 16 | |
| 17 | if db.Statement.Result != nil { |
| 18 | db.Statement.Result.Result = result |
| 19 | db.Statement.Result.RowsAffected = db.RowsAffected |
| 20 | } |
| 21 | } |
| 22 | } |
nothing calls this directly
no test coverage detected