BadQueryer implements the Connection interface, but fails on every call to Exec or Query. The error message will include the SQL statement to help verify the "right" failure occurred.
| 25 | // Exec or Query. The error message will include the SQL statement to help |
| 26 | // verify the "right" failure occurred. |
| 27 | type BadQueryer struct{} |
| 28 | |
| 29 | func (bq BadQueryer) ExecContext(ctx context.Context, sql string, args ...interface{}) (sql.Result, error) { |
| 30 | return nil, fmt.Errorf("FAIL: %s", strings.TrimSpace(sql)) |
nothing calls this directly
no outgoing calls
no test coverage detected