| 1247 | } |
| 1248 | |
| 1249 | func insertAuthorizedFilter(query string, replaceWith string) (string, error) { |
| 1250 | if !strings.Contains(query, authorizedQueryPlaceholder) { |
| 1251 | return "", xerrors.Errorf("query does not contain authorized replace string, this is not an authorized query") |
| 1252 | } |
| 1253 | filtered := strings.ReplaceAll(query, authorizedQueryPlaceholder, replaceWith) |
| 1254 | return filtered, nil |
| 1255 | } |
| 1256 | |
| 1257 | // UpdateUserLinkRawJSON is a custom query for unit testing. Do not ever expose this |
| 1258 | func (q *sqlQuerier) UpdateUserLinkRawJSON(ctx context.Context, userID uuid.UUID, data json.RawMessage) error { |