MustExecContext execs the query using e and panics if there was an error. Any placeholder parameters are replaced with supplied args.
(ctx context.Context, e ExecerContext, query string, args ...interface{})
| 111 | // MustExecContext execs the query using e and panics if there was an error. |
| 112 | // Any placeholder parameters are replaced with supplied args. |
| 113 | func MustExecContext(ctx context.Context, e ExecerContext, query string, args ...interface{}) sql.Result { |
| 114 | res, err := e.ExecContext(ctx, query, args...) |
| 115 | if err != nil { |
| 116 | panic(err) |
| 117 | } |
| 118 | return res |
| 119 | } |
| 120 | |
| 121 | // PrepareNamedContext returns an sqlx.NamedStmt |
| 122 | func (db *DB) PrepareNamedContext(ctx context.Context, query string) (*NamedStmt, error) { |
no test coverage detected