Updates only the encrypted columns (api_key, api_key_key_id) and the updated_at timestamp on a row. Used by the dbcrypt key rotation utility to re-encrypt or decrypt rows in place.
(ctx context.Context, arg UpdateEncryptedAIProviderKeyParams)
| 394 | // the updated_at timestamp on a row. Used by the dbcrypt key |
| 395 | // rotation utility to re-encrypt or decrypt rows in place. |
| 396 | func (q *sqlQuerier) UpdateEncryptedAIProviderKey(ctx context.Context, arg UpdateEncryptedAIProviderKeyParams) (AIProviderKey, error) { |
| 397 | row := q.db.QueryRowContext(ctx, updateEncryptedAIProviderKey, arg.APIKey, arg.ApiKeyKeyID, arg.ID) |
| 398 | var i AIProviderKey |
| 399 | err := row.Scan( |
| 400 | &i.ID, |
| 401 | &i.ProviderID, |
| 402 | &i.APIKey, |
| 403 | &i.ApiKeyKeyID, |
| 404 | &i.CreatedAt, |
| 405 | &i.UpdatedAt, |
| 406 | ) |
| 407 | return i, err |
| 408 | } |
| 409 | |
| 410 | const deleteAIProviderByID = `-- name: DeleteAIProviderByID :exec |
| 411 | UPDATE |
nothing calls this directly
no test coverage detected