NamedExecContext 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.
(ctx context.Context, e ExtContext, query string, arg interface{})
| 125 | // then runs Exec on the result. Returns an error from the binding |
| 126 | // or the query execution itself. |
| 127 | func NamedExecContext(ctx context.Context, e ExtContext, query string, arg interface{}) (sql.Result, error) { |
| 128 | q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) |
| 129 | if err != nil { |
| 130 | return nil, err |
| 131 | } |
| 132 | return e.ExecContext(ctx, q, args...) |
| 133 | } |
no test coverage detected