Exec executes raw sql
(sql string, values ...interface{})
| 782 | |
| 783 | // Exec executes raw sql |
| 784 | func (db *DB) Exec(sql string, values ...interface{}) (tx *DB) { |
| 785 | tx = db.getInstance() |
| 786 | tx.Statement.SQL = strings.Builder{} |
| 787 | |
| 788 | if strings.Contains(sql, "@") { |
| 789 | clause.NamedExpr{SQL: sql, Vars: values}.Build(tx.Statement) |
| 790 | } else { |
| 791 | clause.Expr{SQL: sql, Vars: values}.Build(tx.Statement) |
| 792 | } |
| 793 | |
| 794 | return tx.callbacks.Raw().Execute(tx) |
| 795 | } |
nothing calls this directly
no test coverage detected