(ctx context.Context, query string, args ...interface{})
| 107 | } |
| 108 | |
| 109 | func (db *PreparedStmtDB) ExecContext(ctx context.Context, query string, args ...interface{}) (result sql.Result, err error) { |
| 110 | stmt, err := db.prepare(ctx, db.ConnPool, false, query) |
| 111 | if err == nil { |
| 112 | result, err = stmt.ExecContext(ctx, args...) |
| 113 | if errors.Is(err, driver.ErrBadConn) { |
| 114 | db.Stmts.Delete(query) |
| 115 | } |
| 116 | } |
| 117 | return result, err |
| 118 | } |
| 119 | |
| 120 | func (db *PreparedStmtDB) QueryContext(ctx context.Context, query string, args ...interface{}) (rows *sql.Rows, err error) { |
| 121 | stmt, err := db.prepare(ctx, db.ConnPool, false, query) |
nothing calls this directly
no test coverage detected