NamedExec uses BindStruct to get a query executable by the driver and then runs Exec on the result. Returns an error from the binding or the query execution itself.
(e Ext, query string, arg interface{})
| 450 | // then runs Exec on the result. Returns an error from the binding |
| 451 | // or the query execution itself. |
| 452 | func NamedExec(e Ext, query string, arg interface{}) (sql.Result, error) { |
| 453 | q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) |
| 454 | if err != nil { |
| 455 | return nil, err |
| 456 | } |
| 457 | return e.Exec(q, args...) |
| 458 | } |
no test coverage detected